[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230403124707.102986-2-javier.carrasco@wolfvision.net>
Date: Mon, 3 Apr 2023 14:47:06 +0200
From: Javier Carrasco <javier.carrasco@...fvision.net>
To: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Linus Walleij <linus.walleij@...aro.org>,
Uwe Kleine-g <u.kleine-koenig@...gutronix.de>,
Michael Riesch <michael.riesch@...fvision.net>,
Javier Carrasco <javier.carrasco@...fvision.net>
Subject: [PATCH 1/2] Input: st1232 - remove enable/disable irq in resume/suspend callbacks
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@...fvision.net>
---
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
Powered by blists - more mailing lists