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>
Mon, 10 Jun 2019 03:24:55 +0000 (11:24 +0800)
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 da9518b698f41e460ef2814f0ad4b74647517c36..a04f4475a567740e0a83ee71b5b92f36a7854b70 100644 (file)
@@ -1978,7 +1978,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)) {