From: xuwei9 Date: Fri, 29 Mar 2019 01:49:45 +0000 (+0800) Subject: kernel: change the charger full condition with tolerance X-Git-Tag: MMI-RSBS31.Q1-48-36-26~193 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60fc018a9f4c826dcadbdf6ed374685e0020ac38;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git kernel: change the charger full condition with tolerance change the charger full condition with tolerance Change-Id: Ia544309b142b9fc6e879c7f40701c2d303700e3d Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/1329520 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/drivers/power/supply/s2mu00x_battery.c b/drivers/power/supply/s2mu00x_battery.c index 16e946f1c68a..77796a2b2672 100644 --- a/drivers/power/supply/s2mu00x_battery.c +++ b/drivers/power/supply/s2mu00x_battery.c @@ -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)) {