mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
charging: remove FULL status in charging ic driver
As moto charging FULL status judge in SW policy, so we must remove FULL status in charging ic driver. Change-Id: I881b1464bdeb9e9c6599dee15d33189c6b4d1594 Signed-off-by: mahj8 <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2128758 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
c17e04702f
commit
3974bb7b3f
2 changed files with 2 additions and 6 deletions
|
|
@ -1028,12 +1028,10 @@ static int bq2589x_power_supply_get_property(struct power_supply *psy,
|
|||
chrg_status = bq2589x_get_charging_status(bq);
|
||||
if (!state.online)
|
||||
val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
|
||||
else if (chrg_status == STATUS_NOT_CHARGING)
|
||||
else if (chrg_status == STATUS_NOT_CHARGING || chrg_status == STATUS_TERMINATION_DONE)
|
||||
val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
|
||||
else if (chrg_status == STATUS_PRE_CHARGING || chrg_status == STATUS_FAST_CHARGING)
|
||||
val->intval = POWER_SUPPLY_STATUS_CHARGING;
|
||||
else if (chrg_status == STATUS_TERMINATION_DONE)
|
||||
val->intval = POWER_SUPPLY_STATUS_FULL;
|
||||
else
|
||||
val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1060,10 +1060,8 @@ static int sgm4154x_charger_get_property(struct power_supply *psy,
|
|||
chrg_status = sgm4154x_get_charging_status(sgm);
|
||||
if (!state.chrg_type || (state.chrg_type == SGM4154x_OTG_MODE))
|
||||
val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
|
||||
else if (!chrg_status)
|
||||
else if (!chrg_status || (chrg_status == SGM4154x_TERM_CHRG))
|
||||
val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
|
||||
else if (chrg_status == SGM4154x_TERM_CHRG)
|
||||
val->intval = POWER_SUPPLY_STATUS_FULL;
|
||||
else
|
||||
val->intval = POWER_SUPPLY_STATUS_CHARGING;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue