diff mbox series

[1/2] Input: st1232 - remove enable/disable irq in resume/suspend callbacks

Message ID 20230403124707.102986-2-javier.carrasco@wolfvision.net (mailing list archive)
State Under Review
Headers show
Series Input: st1232: wakeup in Suspend to idle | expand

Commit Message

Javier Carrasco April 3, 2023, 12:47 p.m. UTC
Disabling the interrupts in the suspend callback leads to a loss of the
wakeup capability in suspend to idle (freeze) mode.

In commit 95dc58a9a02f ("Input: st1232 - rely on I2C core to configure
wakeup interrupt") redundancy was removed by letting the I2C core manage
the wake interrupt handling. On the other hand, the irq enabling/disabling
was generalized to all devices, regardless of their wakeup capabilities.

The interrupt enabling/disabling is carried out by the power subsystem in
the resume/suspend states and therefore there is no need to manage it
in the device driver. Remove the irq handling in the driver-specific
resume/suspend callbacks and rely on the power subsystem.

Fixes: 95dc58a9a02f ("Input: st1232 - rely on I2C core to configure wakeup interrupt")
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
 drivers/input/touchscreen/st1232.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index f49566dc96f8..faa0be3993f4 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -345,8 +345,6 @@  static int st1232_ts_suspend(struct device *dev)
 	struct i2c_client *client = to_i2c_client(dev);
 	struct st1232_ts_data *ts = i2c_get_clientdata(client);
 
-	disable_irq(client->irq);
-
 	if (!device_may_wakeup(&client->dev))
 		st1232_ts_power(ts, false);
 
@@ -361,8 +359,6 @@  static int st1232_ts_resume(struct device *dev)
 	if (!device_may_wakeup(&client->dev))
 		st1232_ts_power(ts, true);
 
-	enable_irq(client->irq);
-
 	return 0;
 }