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 <shjain@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
This commit is contained in:
Shantanu Jain 2013-08-05 16:52:47 +05:30 committed by Gerrit - the friendly Code Review server
parent 6ae8594368
commit c39dd15cf7

View file

@ -1935,7 +1935,7 @@ Output:
*******************************************************/ *******************************************************/
static void goodix_ts_suspend(struct goodix_ts_data *ts) static void goodix_ts_suspend(struct goodix_ts_data *ts)
{ {
int ret = -1; int ret = -1, i;
GTP_DEBUG_FUNC(); GTP_DEBUG_FUNC();
@ -1951,6 +1951,13 @@ static void goodix_ts_suspend(struct goodix_ts_data *ts)
gtp_irq_disable(ts); gtp_irq_disable(ts);
else else
hrtimer_cancel(&ts->timer); 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); ret = gtp_enter_sleep(ts);
#endif #endif
if (ret < 0) if (ret < 0)