kernel: change the charger full condition with tolerance
authorxuwei9 <xuwei9@lenovo.com>
Fri, 29 Mar 2019 01:49:45 +0000 (09:49 +0800)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:57 +0000 (20:23 +0300)
change the charger full condition
with tolerance

Change-Id: Ia544309b142b9fc6e879c7f40701c2d303700e3d
Signed-off-by: xuwei9 <xuwei9@mt.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)) {