mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
sgm4154x_charger_lite:get charge counter from flip fg
get charge counter value from flip fg and assign this value to batt_chg_counter of battery info struct. Change-Id: I4356f928217dc2806fc722d2e8d9e7ff1da755d6 Reviewed-on: https://gerrit.mot.com/2300250 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
0b97a147ed
commit
e70961e21b
1 changed files with 3 additions and 0 deletions
|
|
@ -2033,6 +2033,9 @@ static int sgm4154x_charger_get_batt_info(void *data, struct mmi_battery_info *b
|
|||
rc = power_supply_get_property(chg->fg_psy, POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, &val);
|
||||
if (!rc)
|
||||
chg->batt_info.batt_design_uah = val.intval;
|
||||
rc = power_supply_get_property(chg->fg_psy, POWER_SUPPLY_PROP_CHARGE_COUNTER, &val);
|
||||
if (!rc)
|
||||
chg->batt_info.batt_chg_counter = val.intval;
|
||||
|
||||
if (chg->chg_cfg.full_charged)
|
||||
chg->batt_info.batt_status = POWER_SUPPLY_STATUS_FULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue