MMI: fixed unit can't recharge issue

unit can't recharge after charge full.
When unit charge full, it will get the forced capacity 100%, so
chrg_step can't be switch to STEP_NORM from STEP_FULL.

Change-Id: Idd1a963b34cdbd14b446160948315d45704a0d88
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1456841
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Haijian Ma 2019-11-18 11:51:22 +08:00
commit bde9316909

View file

@ -2628,7 +2628,8 @@ static void mmi_basic_charge_sm(struct smb_mmi_charger *chip,
prm->pres_chrg_step = STEP_FULL;
}
} else if (prm->pres_chrg_step == STEP_FULL) {
if (stat->batt_soc <= 99) {
if ((stat->batt_soc <= 99) ||
stat->batt_mv < (max_fv_mv - HYST_STEP_MV * 2)) {
prm->chrg_taper_cnt = 0;
prm->pres_chrg_step = STEP_NORM;
}