touchscreen_mmi: Only update refresh & charger when active

When IC not resume, LCD refresh and charger mode no need set to IC.
Just save the value and the value will restore in IC resume work.

Change-Id: Icadcb7883c6347ae65c5ebaafac39d138cbac5e4
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543990
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
haojl2 2020-04-28 14:53:50 +08:00 • committed by Jialei Hao
commit ee308c6c73

View file

@ -271,7 +271,8 @@ static int ts_mmi_refresh_rate_cb(struct notifier_block *nb,
if (!touch_cdev->refresh_rate ||
(touch_cdev->refresh_rate != (refresh_rate & 0xFF))) {
touch_cdev->refresh_rate = refresh_rate & 0xFF;
do_calibration = true;
if (is_touch_active)
do_calibration = true;
}
if (do_calibration) {
@ -320,8 +321,10 @@ static int ts_mmi_charger_cb(struct notifier_block *self,
if (touch_cdev->ps_is_present != present) {
touch_cdev->ps_is_present = present;
kfifo_put(&touch_cdev->cmd_pipe, TS_MMI_DO_PS);
schedule_delayed_work(&touch_cdev->work, 0);
if (is_touch_active) {
kfifo_put(&touch_cdev->cmd_pipe, TS_MMI_DO_PS);
schedule_delayed_work(&touch_cdev->work, 0);
}
}
return 0;