mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
charging: fixed logic error
When count =1 and charger also present, it will run count reset and cancel charger check work, so add charger present condition. Change-Id: I4a6b871cc23a18b8f9412d16f35949c610cc17e3 Signed-off-by: Haijian Ma <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/1396760 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
70a6f9ebd7
commit
5a28fcc34d
1 changed files with 3 additions and 1 deletions
|
|
@ -2915,9 +2915,11 @@ static void mmi_heartbeat_work(struct work_struct *work)
|
|||
mmi_info(chip, "APSD = %d, rerun_apsd_count = %d\n",
|
||||
apsd, rerun_apsd_count);
|
||||
}
|
||||
} else if (rerun_apsd_count) {
|
||||
} else if (rerun_apsd_count && !chg_stat.charger_present) {
|
||||
rerun_apsd_count = 0;
|
||||
cancel_delayed_work(&chip->charger_check_work);
|
||||
mmi_info(chip, "reset rerun_apsd_count = %d\n",
|
||||
rerun_apsd_count);
|
||||
}
|
||||
|
||||
mmi_chrg_rate_check(chip);
|
||||
|
|
|
|||
Loading…
Reference in a new issue