From d08495df994547d2dc9b7d671bc45651fce8c992 Mon Sep 17 00:00:00 2001 From: wangyq13 Date: Thu, 13 Jan 2022 16:01:58 +0800 Subject: [PATCH] input: goodix_v1510: fix irq wake disable unbalanced issue - make irq wake enable and disable match, fix unbalanced issue - port https://gerrit.mot.com/#/c/2158726/, increase i2c try times - port goodix latest 1.5.2 version, sync input event when suspend. Change-Id: I6e5639356db18e37698ff0b6e8101e5b4a724143 Signed-off-by: wangyq13 Reviewed-on: https://gerrit.mot.com/2169342 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: litong Reviewed-by: Jun Weng Reviewed-by: Jichao Zou Submit-Approved: Jira Key --- .../input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.c | 3 +-- .../input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.h | 2 +- .../touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_gesture.c | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.c b/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.c index de981e59ed2a..c1af962b0c43 100644 --- a/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.c +++ b/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.c @@ -1870,7 +1870,7 @@ static void goodix_ts_release_connects(struct goodix_ts_core *core_data) false); } input_report_key(input_dev, BTN_TOUCH, 0); - /* input_mt_sync_frame(input_dev); */ + input_mt_sync_frame(input_dev); input_sync(input_dev); } } @@ -2022,7 +2022,6 @@ static int goodix_ts_resume(struct goodix_ts_core *core_data) mutex_unlock(&goodix_modules.mutex); goodix_ts_irq_enable(core_data, true); - disable_irq_wake(core_data->irq); /* * notify resume event, inform the esd protector diff --git a/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.h b/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.h index 064eab30e8f2..a7ae23258d32 100644 --- a/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.h +++ b/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_core.h @@ -54,7 +54,7 @@ #define GOODIX_CORE_DRIVER_NAME "goodix_ts" #define GOODIX_PEN_DRIVER_NAME "goodix_ts,pen" #define GOODIX_DRIVER_VERSION "v1.5.1.0" -#define GOODIX_BUS_RETRY_TIMES 3 +#define GOODIX_BUS_RETRY_TIMES 20 #define GOODIX_MAX_TOUCH 10 #define GOODIX_CFG_MAX_SIZE 4096 #define GOODIX_ESD_TICK_WRITE_DATA 0xAA diff --git a/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_gesture.c b/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_gesture.c index 33ad9f54963d..eb8c70b0dfa5 100644 --- a/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_gesture.c +++ b/drivers/input/touchscreen/goodix_gtx8_v1510_mmi/goodix_ts_gesture.c @@ -416,8 +416,6 @@ int gsx_gesture_before_suspend_mmi(struct goodix_ts_core *core_data) else ts_err("Set IC in gesture mode"); - enable_irq_wake(core_data->irq); - return EVT_CANCEL_SUSPEND; }