mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
smbcharger-mmi: Report turbo charging for wireless
Report wireless turbo charging if wireless reports that it is a fast charger Change-Id: I0312700bb7cfb8a44b4486f272aa91e8ce298a75 Signed-off-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-on: https://gerrit.mot.com/1548060 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ling Jin <lingjin@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
47210f01e5
commit
49346a25ab
1 changed files with 7 additions and 1 deletions
|
|
@ -2184,6 +2184,7 @@ int is_wls_online(struct smb_mmi_charger *chg)
|
|||
void mmi_chrg_rate_check(struct smb_mmi_charger *chg)
|
||||
{
|
||||
union power_supply_propval val;
|
||||
union power_supply_propval wls_val;
|
||||
int chrg_v_mv = 0;
|
||||
int chrg_cm_ma = 0;
|
||||
int chrg_cs_ma = 0;
|
||||
|
|
@ -2204,7 +2205,12 @@ void mmi_chrg_rate_check(struct smb_mmi_charger *chg)
|
|||
}
|
||||
|
||||
if (val.intval && is_wls_online(chg)) {
|
||||
chg->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;
|
||||
rc = power_supply_get_property(chg->wls_psy,
|
||||
POWER_SUPPLY_PROP_CHARGE_TYPE, &wls_val);
|
||||
if (rc >= 0 && wls_val.intval == POWER_SUPPLY_CHARGE_TYPE_FAST)
|
||||
chg->charger_rate = POWER_SUPPLY_CHARGE_RATE_TURBO;
|
||||
else
|
||||
chg->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;
|
||||
goto end_rate_check;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue