From c39dd15cf735d4b07013a80a59866b4952b4f7f7 Mon Sep 17 00:00:00 2001 From: Shantanu Jain Date: Mon, 5 Aug 2013 16:52:47 +0530 Subject: [PATCH] input: touchscreen: release all touches before suspend Release all touches before going to suspend for goodix gt9xx TS driver. Change-Id: Ia3446f3c23be4fe29bfea5f85b22e8b903cffb9e Signed-off-by: Shantanu Jain Signed-off-by: Sudhakar Manapati --- drivers/input/touchscreen/gt9xx/gt9xx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/gt9xx/gt9xx.c b/drivers/input/touchscreen/gt9xx/gt9xx.c index ebb9ce7ba6a4..71834056f3f0 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx.c +++ b/drivers/input/touchscreen/gt9xx/gt9xx.c @@ -1935,7 +1935,7 @@ Output: *******************************************************/ static void goodix_ts_suspend(struct goodix_ts_data *ts) { - int ret = -1; + int ret = -1, i; GTP_DEBUG_FUNC(); @@ -1951,6 +1951,13 @@ static void goodix_ts_suspend(struct goodix_ts_data *ts) gtp_irq_disable(ts); else hrtimer_cancel(&ts->timer); + + for (i = 0; i < GTP_MAX_TOUCH; i++) + gtp_touch_up(ts, i); + + input_report_key(ts->input_dev, BTN_TOUCH, 0); + input_sync(ts->input_dev); + ret = gtp_enter_sleep(ts); #endif if (ret < 0)