mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Set to discharging status if charger absent
Set charging status to discharging if charger absent in case FG report confused status. Change-Id: I95194b19750eb5af422ebb05f5937ca18a15a61c Signed-off-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/2301533 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
6b5d72caf4
commit
7eb1770837
1 changed files with 3 additions and 0 deletions
|
|
@ -2040,6 +2040,9 @@ static int sgm4154x_charger_get_batt_info(void *data, struct mmi_battery_info *b
|
|||
if (chg->chg_cfg.full_charged)
|
||||
chg->batt_info.batt_status = POWER_SUPPLY_STATUS_FULL;
|
||||
|
||||
if (!chg->sgm->state.online)
|
||||
chg->batt_info.batt_status = POWER_SUPPLY_STATUS_DISCHARGING;
|
||||
|
||||
memcpy(batt_info, &chg->batt_info, sizeof(struct mmi_battery_info));
|
||||
if (chg->paired_batt_info.batt_soc == 0 &&
|
||||
chg->paired_batt_info.batt_mv < EMPTY_BATTERY_VBAT) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue