power: supply: max77693: Expose input current limit and CC current properties
There are two charger current limit registers: - Fast charge current limit (which controls current going from the charger to the battery); - CHGIN input current limit (which controls current going into the charger through the cable). Add the necessary functions to retrieve the CHGIN input limit (from CHARGER regulator) and maximum fast charge current values, and expose them as power supply properties. Tested-by: Henrik Grimler <henrik@grimler.se> Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240816-max77693-charger-extcon-v4-3-050a0a9bfea0@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
3a3acf839b
commit
ba7e053ec8
@@ -217,6 +217,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
|
||||
@@ -244,6 +248,7 @@ enum max77693_charger_battery_state {
|
||||
#define CHG_CNFG_12_VCHGINREG_MASK (0x3 << CHG_CNFG_12_VCHGINREG_SHIFT)
|
||||
|
||||
/* MAX77693 CHG_CNFG_09 Register */
|
||||
#define CHG_CNFG_09_CHGIN_ILIM_SHIFT 0
|
||||
#define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F
|
||||
|
||||
/* MAX77693 CHG_CTRL Register */
|
||||
|
||||
Reference in New Issue
Block a user