mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
DLKM: UI batt level show 100% when real batt level 0%
The unit boot when real batt_soc 0%, the UI batt level show 100%. The root cause is combine soc is 100 when init, and now mmi_combine_battery_soc api return soc is -1, so don't update the combine soc. Change-Id: I9e41b7f68c735b76c384d1cdcf3ffb6735db4f57 Signed-off-by: mahj8 <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2098253 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
98012f1ed0
commit
54f61e0846
1 changed files with 1 additions and 1 deletions
|
|
@ -1682,7 +1682,7 @@ static int mmi_combine_battery_soc(struct mmi_charger_chip *chip)
|
|||
full += battery->info->batt_full_uah;
|
||||
}
|
||||
|
||||
if (full > 0 && remain > 0) {
|
||||
if (full > 0 && remain >= 0) {
|
||||
soc = remain / full;
|
||||
if (soc > 100)
|
||||
soc = 100;
|
||||
|
|
|
|||
Loading…
Reference in a new issue