summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/input/touchscreen/it7258_ts_i2c.c6
1 files 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);
}