mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
power: supply: axp288_charger: Fix initial constant_charge_current value
We should look at val which contains the value read from the register,
not ret which is always 0 on a successful read.
Signed-off-by: Hans de Goede <[email protected]>
Fixes: eac53b3664 ("power: supply: axp288_charger: Drop platform_data dependency")
Signed-off-by: Sebastian Reichel <[email protected]>
This commit is contained in:
parent
ada1de89f3
commit
f2a42595f0
1 changed files with 1 additions and 1 deletions
|
|
@ -718,7 +718,7 @@ static int charger_init_hw_regs(struct axp288_chrg_info *info)
|
|||
}
|
||||
|
||||
/* Determine charge current limit */
|
||||
cc = (ret & CHRG_CCCV_CC_MASK) >> CHRG_CCCV_CC_BIT_POS;
|
||||
cc = (val & CHRG_CCCV_CC_MASK) >> CHRG_CCCV_CC_BIT_POS;
|
||||
cc = (cc * CHRG_CCCV_CC_LSB_RES) + CHRG_CCCV_CC_OFFSET;
|
||||
info->cc = cc;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue