From: Javier Carrasco <javier.carrasco@wolfvision.net>
To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Linus Walleij <linus.walleij@linaro.org>,
Uwe Kleine-g <u.kleine-koenig@pengutronix.de>,
Michael Riesch <michael.riesch@wolfvision.net>,
Javier Carrasco <javier.carrasco@wolfvision.net>
Subject: [PATCH 1/2] Input: st1232 - remove enable/disable irq in resume/suspend callbacks
Date: Mon, 3 Apr 2023 14:47:06 +0200 [thread overview]
Message-ID: <20230403124707.102986-2-javier.carrasco@wolfvision.net> (raw)
In-Reply-To: <20230403124707.102986-1-javier.carrasco@wolfvision.net>
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 --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
next prev parent reply other threads:[~2023-04-03 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 12:47 [PATCH 0/2] Input: st1232: wakeup in Suspend to idle Javier Carrasco
2023-04-03 12:47 ` Javier Carrasco [this message]
2023-04-03 12:47 ` [PATCH 2/2] Input: st1232 - add wake up event counting Javier Carrasco
2023-04-18 4:12 ` [PATCH 0/2] Input: st1232: wakeup in Suspend to idle Javier Carrasco Cruz
2023-05-10 8:42 ` Javier Carrasco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230403124707.102986-2-javier.carrasco@wolfvision.net \
--to=javier.carrasco@wolfvision.net \
--cc=Jonathan.Cameron@huawei.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.riesch@wolfvision.net \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox