From 54134850b07c335d110050dd5837af9f4bb5b1c6 Mon Sep 17 00:00:00 2001 From: davidycchen Date: Wed, 23 Nov 2022 11:53:57 +0800 Subject: goodix: move finger releasing process to GTI. Bug: 260020612 Test: suspend/resume the device. Change-Id: I54a183f8dc618bb2f54d87e45893d4439a7f6e64 Signed-off-by: davidycchen --- goodix_ts_core.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/goodix_ts_core.c b/goodix_ts_core.c index 10617c5..eb34f83 100644 --- a/goodix_ts_core.c +++ b/goodix_ts_core.c @@ -2330,28 +2330,6 @@ static void goodix_ts_release_connects(struct goodix_ts_core *core_data) } #endif -#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) -static void goodix_ts_release_connects_goog(struct goodix_ts_core *core_data) -{ - struct input_dev *input_dev = core_data->input_dev; - struct goog_touch_interface *gti = core_data->gti; - int i; - - goog_input_lock(gti); - - goog_input_set_timestamp(gti, input_dev, KTIME_RELEASE_ALL); - for (i = 0; i < GOODIX_MAX_TOUCH; i++) { - goog_input_mt_slot(gti, input_dev, i); - goog_input_mt_report_slot_state( - gti, input_dev, MT_TOOL_FINGER, false); - } - goog_input_report_key(gti, input_dev, BTN_TOUCH, 0); - goog_input_sync(gti, input_dev); - - goog_input_unlock(gti); -} -#endif - /** * goodix_ts_suspend - Touchscreen suspend function * Called by PM/FB/EARLYSUSPEN module to put the device to sleep @@ -2428,9 +2406,7 @@ static int goodix_ts_suspend(struct goodix_ts_core *core_data) goodix_set_pinctrl_state(core_data, PINCTRL_MODE_SUSPEND); out: -#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) - goodix_ts_release_connects_goog(core_data); -#else +#if !IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) goodix_ts_release_connects(core_data); #endif -- cgit v1.2.3