Message ID | 20240530-max77693-charger-extcon-v1-3-dc2a9e5bdf30@gmail.com |
---|---|
State | New |
Headers | show |
Series | power: supply: max77693: Toggle charging/OTG based on extcon status | expand |
On 30/05/2024 10:55, Artur Weber wrote: > From: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> > > This prepares for an updated regulator and charger driver. The defines > are needed to set the maximum input current and the fast charge > current. > > Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> > [GNUtoo@cyberdimension.org: small fix] > Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> > [Artur: swap hardcoded ILIM values for DEFAULT_FAST_CHARGE_CURRENT] > Signed-off-by: Artur Weber <aweber.kernel@gmail.com> > --- > include/linux/mfd/max77693-private.h | 6 ++++++ > 1 file changed, 6 insertions(+) Please squash it with the next patch using the defines. Having just defines is not really a "change" on its own (I know that AMD will disagree but they are wrong...). Best regards, Krzysztof
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 54444ff2a5de..4570646e2f33 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -145,6 +145,8 @@ enum max77693_pmic_reg { #define DEFAULT_THERMAL_REGULATION_TEMP 100 /* microamps */ #define DEFAULT_BATTERY_OVERCURRENT 3500000 +/* microamps */ +#define DEFAULT_FAST_CHARGE_CURRENT 500000 /* microvolts */ #define DEFAULT_CHARGER_INPUT_THRESHOLD_VOLT 4300000 @@ -217,6 +219,10 @@ enum max77693_charger_battery_state { #define CHG_CNFG_01_CHGRSTRT_MASK (0x3 << CHG_CNFG_01_CHGRSTRT_SHIFT) #define CHG_CNFG_01_PQEN_MAKS BIT(CHG_CNFG_01_PQEN_SHIFT) +/* MAX77693_CHG_REG_CHG_CNFG_02 register */ +#define CHG_CNFG_02_CC_SHIFT 0 +#define CHG_CNFG_02_CC_MASK 0x3F + /* MAX77693_CHG_REG_CHG_CNFG_03 register */ #define CHG_CNFG_03_TOITH_SHIFT 0 #define CHG_CNFG_03_TOTIME_SHIFT 3