mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
charging: charging state machine don't depend on battery soc
charging state machine use battery voltage as condition to switch state instead of battery soc. 1.Sometimes batt soc have some error in low temperature and less then 100%, charging can't auto stop when battery FULL. 2.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. refer to https://gerrit.mot.com/#/c/1926738/ Change-Id: I1f9a3926d1e39168b4df227e8172a43dc0af58bc Signed-off-by: Guocheng Wang <wanggc6@motorola.com> Reviewed-on: https://gerrit.mot.com/2730249 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
791959291c
commit
cdb9875ddc
1 changed files with 2 additions and 4 deletions
|
|
@ -3453,8 +3453,7 @@ static void mmi_basic_charge_sm(struct smb_mmi_charger *chip,
|
|||
} else if (prm->pres_chrg_step == STEP_NORM) {
|
||||
if (!zone->fcc_norm_ma)
|
||||
prm->pres_chrg_step = STEP_FLOAT;
|
||||
else if ((stat->batt_soc < 100) ||
|
||||
(stat->batt_mv + HYST_STEP_MV) < max_fv_mv) {
|
||||
else if ((stat->batt_mv + HYST_STEP_MV/2) < max_fv_mv) {
|
||||
prm->chrg_taper_cnt = 0;
|
||||
prm->pres_chrg_step = STEP_NORM;
|
||||
} else if (mmi_has_current_tapered(BASE_BATT, chip, prm, stat->batt_ma,
|
||||
|
|
@ -3462,8 +3461,7 @@ 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) ||
|
||||
stat->batt_mv < (max_fv_mv - HYST_STEP_MV * 2)) {
|
||||
if (stat->batt_mv < (max_fv_mv - HYST_STEP_MV * 2)) {
|
||||
prm->chrg_taper_cnt = 0;
|
||||
prm->pres_chrg_step = STEP_NORM;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue