Solve I2C error in the first suspend

TP:
Initializing the touch PM_MODE is PM_ACTIVE when registering the 
notification chain, to solve I2C error in the first suspend.

Change-Id: I80e6a20484cba58dd1f8a25c0b0707d0b8a95eb7
Reviewed-on: https://gerrit.mot.com/1493127
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong 2020-02-05 19:29:13 +08:00 • committed by litong20
commit ebdae4dd88

View file

@ -337,6 +337,13 @@ int ts_mmi_notifiers_register(struct ts_mmi_dev *touch_cdev)
goto PS_NOTIF_REGISTER_FAILED;
}
/*
Because the touch pm_mode default is TS_MMI_PM_DEEPSLEEP, when the first suspend occurs,
the interrupt will not be turned off, which results in I2C error.
Need to set the initial pm_mode of the touch to PM_ACTIVE.
*/
touch_cdev->pm_mode = TS_MMI_PM_ACTIVE;
touch_cdev->panel_nb.notifier_call = ts_mmi_panel_cb;
ret = register_panel_notifier(&touch_cdev->panel_nb);
if (ret)