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

From: Javier Carrasco
Date: Mon Apr 03 2023 - 08:58:04 EST


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@xxxxxxxxxxxxxx>
---
drivers/input/touchscreen/st1232.c | 4 ----
1 file changed, 4 deletions(-)

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;
}

--
2.37.2