From cb60550be00737401dfc8485d4f50a39183cdabc Mon Sep 17 00:00:00 2001 From: Yan Zhang Date: Mon, 7 Mar 2022 16:28:20 +0800 Subject: [PATCH] : Fix fod event not working during touch resume Why: Fix fod event not working during touch resume Change-Id: Ib451c2296c53c6e1ef42d5e396a9d1725c01cc61 Signed-off-by: Yan Zhang Reviewed-on: https://gerrit.mot.com/2208743 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- .../touchscreen/goodix_berlin_mmi/goodix_ts_gesture_fod.c | 2 ++ .../input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_gesture_fod.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_gesture_fod.c index 3be2cbe34f9d..160a242e8a1d 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_gesture_fod.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_gesture_fod.c @@ -336,6 +336,8 @@ static int gsx_gesture_init(struct goodix_ts_core *cd, /*enable all gesture wakeup by default */ gsx->ts_core->gesture_type = GESTURE_SINGLE_TAP |GESTURE_FOD_PRESS; cd->zerotap_data[0] = 0; + //default on the fod event + cd->fod_enable = true; atomic_set(&gsx_gesture->registered, 1); return 0; } diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c index 40e7bdc5b850..f7cb7e7357b2 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c @@ -270,7 +270,9 @@ static void ts_mmi_queued_resume(struct ts_mmi_dev *touch_cdev) touch_cdev->delay_baseline_update = false; } } - + if (touch_cdev->pdata.fod_detection) { + TRY_TO_CALL(update_fod_mode, touch_cdev->fps_state); + } if (NEED_TO_SET_POWER) { /* power turn on in PANEL_EVENT_PRE_DISPLAY_ON. * IC need some time to boot up.