kernel: change the charger full condition with tolerance
authorxuwei9 <xuwei9@lenovo.com>
Fri, 29 Mar 2019 01:49:45 +0000 (09:49 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:37:00 +0000 (17:37 +0800)
change the charger full condition
with tolerance

Change-Id: Ia544309b142b9fc6e879c7f40701c2d303700e3d
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1329520
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/power/supply/s2mu00x_battery.c

index 16e946f1c68a0ae96571b9dc0b86d7187932fab4..77796a2b2672978deecc226057a6aa8261011060 100644 (file)
@@ -1988,7 +1988,7 @@ static void check_charging_full(
        }
 
        /* 2. Full charged check */
-       if ((battery->current_now >= 0 && battery->current_now <
+       if ((battery->current_now >= (-10) && battery->current_now <
                                battery->pdata->charging_current[
                                battery->cable_type].full_check_current) &&
                        (battery->voltage_avg > battery->pdata->chg_full_vcell)) {