summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-06-05 17:05:00 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-06-05 20:34:11 -0700
commit172b07a6ead345b625af7e5f147ec64fbd256f79 (patch)
tree6241858766b49b0c17e6385734a4bb77caf914f2 /drivers/input/touchscreen
parent2a15cebb8b40ef55d3a565b9acaec21791cb7e37 (diff)
Input: cy8ctmg110_ts - let I2C core configure wake interrupt
I2C core already configures interrupt as wakeup source when device is registered using I2C_CLIENT_WAKE flag, so let's rely on it instead of configuring it ourselves. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210603043726.3793876-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/cy8ctmg110_ts.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c
index d83bf82f02d4..f8d7ab3b6c25 100644
--- a/drivers/input/touchscreen/cy8ctmg110_ts.c
+++ b/drivers/input/touchscreen/cy8ctmg110_ts.c
@@ -254,12 +254,11 @@ static int __maybe_unused cy8ctmg110_suspend(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
- if (device_may_wakeup(&client->dev))
- enable_irq_wake(client->irq);
- else {
+ if (!device_may_wakeup(&client->dev)) {
cy8ctmg110_set_sleepmode(ts, true);
cy8ctmg110_power(ts, false);
}
+
return 0;
}
@@ -268,12 +267,11 @@ static int __maybe_unused cy8ctmg110_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
- if (device_may_wakeup(&client->dev))
- disable_irq_wake(client->irq);
- else {
+ if (!device_may_wakeup(&client->dev)) {
cy8ctmg110_power(ts, true);
cy8ctmg110_set_sleepmode(ts, false);
}
+
return 0;
}