mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
charge:real time check weak charge
PMIC receive usbin OV events, OV IRQ triggers for very small duration in interim periods sometimes. while this periods check charge type will judge inbox charger adapter as weak charge. now logic is always recognize weak charge even if OV event disappear. So add real time check weak charge type mechanism. Change-Id: I18072c56b505f2508292d6b335f71a646d48b6d7 Reviewed-on: https://gerrit.mot.com/1486223 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
64b289fbc6
commit
d60d0e493f
1 changed files with 4 additions and 0 deletions
|
|
@ -1946,6 +1946,10 @@ void mmi_chrg_rate_check(struct smb_mmi_charger *chg)
|
|||
chg->charger_rate = POWER_SUPPLY_CHARGE_RATE_WEAK;
|
||||
else if (prev_chg_rate == POWER_SUPPLY_CHARGE_RATE_NONE)
|
||||
chg->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;
|
||||
else if ((prev_chg_rate == POWER_SUPPLY_CHARGE_RATE_WEAK) &&
|
||||
(chrg_cm_ma > WEAK_CHRG_THRSH) &&
|
||||
(chrg_cs_ma >= WEAK_CHRG_THRSH))
|
||||
chg->charger_rate = POWER_SUPPLY_CHARGE_RATE_NORMAL;
|
||||
|
||||
end_rate_check:
|
||||
if (prev_chg_rate != chg->charger_rate) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue