From ee2823ff3271d649fc6c662d1028334b0a2ab57d Mon Sep 17 00:00:00 2001 From: Shantanu Jain Date: Wed, 7 Oct 2015 14:51:33 +0530 Subject: [PATCH] input: touchscreen: Change touch driver suspend code flow for XO shutdown ITE tech touch driver puts the controller to IDLE state in suspend function through an i2c write into controller register space. But due to multiple triggers of fb blank events, the suspend function is called repeatatively without resume, and the driver causes i2c nacks in suspend function while again putting the controller is IDLE state. This keeps the QUP5 clock ON and XO shutdown doesn't happen. This change prevents the touch driver to execute the i2c write, to put the controller in IDLE state, by repeatative fb blank events, and causes XO shutdown to happen within time limits. Change-Id: Ie3ee6b861c10ae901dea54f252f6a799d688f02a Signed-off-by: Shantanu Jain --- drivers/input/touchscreen/it7258_ts_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/it7258_ts_i2c.c b/drivers/input/touchscreen/it7258_ts_i2c.c index 96cb5b3a4d45..1fa28f1f0d9d 100644 --- a/drivers/input/touchscreen/it7258_ts_i2c.c +++ b/drivers/input/touchscreen/it7258_ts_i2c.c @@ -1898,11 +1898,11 @@ static int IT7260_ts_suspend(struct device *dev) return -EBUSY; } - /* put the device in low power idle mode */ - IT7260_ts_chipLowPowerMode(PWR_CTL_LOW_POWER_MODE); - if (device_may_wakeup(dev)) { if (!gl_ts->device_needs_wakeup) { + /* put the device in low power idle mode */ + IT7260_ts_chipLowPowerMode(PWR_CTL_LOW_POWER_MODE); + gl_ts->device_needs_wakeup = true; enable_irq_wake(gl_ts->client->irq); }