mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
charging: avoid i2c error when system resume and suspend
delete schedule charge monitor work for avoid i2c error when system resume and suspend Change-Id: Ic71b8a094b34d6f68b2fffb2ab14a17c730589e6 Signed-off-by: mahj8 <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2163682 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
c97446a89b
commit
ba840ade41
1 changed files with 4 additions and 4 deletions
|
|
@ -1673,6 +1673,8 @@ static void sgm4154x_vbus_remove(struct sgm4154x_device * sgm)
|
|||
g_qc3p_detected = false;
|
||||
qc3p_update_policy(sgm);
|
||||
#endif
|
||||
|
||||
cancel_delayed_work_sync(&sgm->charge_monitor_work);
|
||||
sgm->pulse_cnt = 0;
|
||||
sgm->typec_apsd_rerun_done = false;
|
||||
sgm->chg_dev->noti.apsd_done = false;
|
||||
|
|
@ -1734,6 +1736,8 @@ static void sgm4154x_vbus_plugin(struct sgm4154x_device * sgm)
|
|||
|
||||
#endif
|
||||
|
||||
schedule_delayed_work(&sgm->charge_monitor_work, 0);
|
||||
|
||||
//notify charging policy to update charger type
|
||||
sgm->chg_dev->noti.apsd_done = true;
|
||||
sgm->typec_apsd_rerun_done = false;
|
||||
|
|
@ -2273,8 +2277,6 @@ static int sgm4154x_suspend_notifier(struct notifier_block *nb,
|
|||
case PM_SUSPEND_PREPARE:
|
||||
pr_err("sgm4154x PM_SUSPEND \n");
|
||||
|
||||
cancel_delayed_work_sync(&sgm->charge_monitor_work);
|
||||
|
||||
sgm->sgm4154x_suspend_flag = 1;
|
||||
|
||||
return NOTIFY_OK;
|
||||
|
|
@ -2282,8 +2284,6 @@ static int sgm4154x_suspend_notifier(struct notifier_block *nb,
|
|||
case PM_POST_SUSPEND:
|
||||
pr_err("sgm4154x PM_RESUME \n");
|
||||
|
||||
schedule_delayed_work(&sgm->charge_monitor_work, msecs_to_jiffies(500));
|
||||
|
||||
sgm->sgm4154x_suspend_flag = 0;
|
||||
|
||||
return NOTIFY_OK;
|
||||
|
|
|
|||
Loading…
Reference in a new issue