charging: stop charging when capacity > upper_limit

As some discrete charging ic can't suspend usb, so need to disable
charging when capacity > upper_limit. I think it don't effect any scene
in pmic charging solution product.

Change-Id: I2f794cd81371169ea29e2e2918ad47430132415f
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2128317
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
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:
mahj8 2021-11-26 11:44:10 +08:00 • committed by Haijian Ma
commit cc8cb1e520

View file

@ -164,7 +164,7 @@ static void update(struct adap_chg_data *data)
if (data->batt_capacity > (upper_limit + 1)) {
#endif
suspend_charging(true);
stop_charging(false);
stop_charging(true);
} else if (data->batt_capacity == (upper_limit + 1)) {
suspend_charging(false);
stop_charging(true);