mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
FG: RT9426a add safeguard for SOH
In some abnormal cases the soh=0 from the chip, that make the bms_charge_counter&&bms_charge_full abnormal,then calculate the wrong UI_SOC for battery. if get soh=0; use old soh to aviod getting the wrong soc. Change-Id: Ic7433d23c3162a96a40f9bc5e7043dcdfb42fb14 Signed-off-by: liuyc20 <liuyc20@lenovo.com> Reviewed-on: https://gerrit.mot.com/2151691 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
881e346bc6
commit
cc3c111f0f
1 changed files with 1 additions and 1 deletions
|
|
@ -413,7 +413,7 @@ static int rt9426a_get_soh(struct rt9426a_chip *chip)
|
|||
int ret;
|
||||
|
||||
ret = rt9426a_reg_read_word(chip->i2c, RT9426A_REG_SOH);
|
||||
if (ret < 0)
|
||||
if (ret <= 0)
|
||||
dev_notice(chip->dev, "%s: read soh fail\n", __func__);
|
||||
else
|
||||
chip->soh = ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue