mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
power: set charge done for battery supply
QG uses the battery supply charge done property for capacity learning, but qcom battery may not be in charge done state when mmi charger terminates the charging as battery is full charged. In that case, QG will not trigger the capacity learning when it completes a full charge cycle. As the FULL charge state is mantained by mmi charger, so set the charge done state once mmi charger complete charging. Change-Id: I574e6f3349949882bb38a759835cf85a67386fb5 Signed-off-by: yanyh2 <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1396976 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
c8e7268b1f
commit
ab22beed7e
1 changed files with 6 additions and 0 deletions
|
|
@ -3361,6 +3361,12 @@ static int batt_get_prop(struct power_supply *psy,
|
|||
else
|
||||
val->intval = chip->sm_param[BASE_BATT].batt_health;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CHARGE_DONE:
|
||||
if (chip->last_reported_status == POWER_SUPPLY_STATUS_FULL)
|
||||
val->intval = 1;
|
||||
else
|
||||
val->intval = 0;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CURRENT_MAX:
|
||||
val->intval = get_effective_result(chip->fcc_votable);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue