From d2b208e3c599b73c797bf39f7cae400bba0e7fc0 Mon Sep 17 00:00:00 2001 From: haojl2 Date: Wed, 4 Sep 2019 14:59:48 +0800 Subject: [PATCH] nova_0flash_mmi: return specific value when gesture on TP: When gesture is on, LCD need use different suspend command. Return specific value to LCD to tell current gesture state. Change-Id: I79e57f448d38d1077f86748d2cacf88e3a74b4e0 Signed-off-by: haojl2 (cherry picked from commit aa605c8d93b9c8258ad3e2133894330aa7f99713) Change-Id: I79e57f448d38d1077f86748d2cacf88e3a74b4e0 Reviewed-on: https://gerrit.mot.com/1426753 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jialei Hao Reviewed-by: Huosheng Liao Reviewed-by: Jun Weng Submit-Approved: Jira Key --- drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c index f808ed3de178..3646537413f4 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c @@ -2452,6 +2452,12 @@ static int nvt_drm_notifier_callback(struct notifier_block *self, unsigned long if (*blank == MSM_DRM_BLANK_POWERDOWN) { NVT_LOG("event=%lu, *blank=%d\n", event, *blank); nvt_ts_suspend(&ts->client->dev); +#ifdef NVT_SENSOR_EN + if (ts->should_enable_gesture) { + NVT_LOG("double tap gesture suspend\n"); + return 1; + } +#endif } } else if (event == MSM_DRM_EVENT_BLANK) { if (*blank == MSM_DRM_BLANK_UNBLANK) {