mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
mmi_parallel_charger: "battery" psy update PROP_STATUS
Under the parallel charging framework, the battery status should be determined by all charging IC status, and not only from pmic charging Change-Id: Idc85e8b96c1ff854f42f321e8e7b7a4c5ec55f6c Signed-off-by: xuwt2 <xuwt2@lenovo.com> Reviewed-on: https://gerrit.mot.com/1435998 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1893580 Reviewed-by: Wei Xu <xuwei9@lenovo.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
This commit is contained in:
parent
ebf219ff99
commit
3ecaecfa2d
1 changed files with 10 additions and 1 deletions
|
|
@ -465,8 +465,17 @@ static int batt_get_property(struct power_supply *psy,
|
|||
mmi_chrg_err(chip, "Get Unknown prop %d rc = %d\n", psp, rc);
|
||||
rc = 0;
|
||||
val->intval = -EINVAL;
|
||||
} else
|
||||
} else {
|
||||
|
||||
val->intval = prop.intval;
|
||||
if (psp == POWER_SUPPLY_PROP_STATUS &&
|
||||
prop.intval == POWER_SUPPLY_STATUS_NOT_CHARGING) {
|
||||
rc = power_supply_get_property(chip->extrn_psy,
|
||||
psp, &prop);
|
||||
if (!rc && prop.intval == POWER_SUPPLY_STATUS_CHARGING)
|
||||
val->intval = prop.intval;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue