From: Josua Mayer <josua@solid-run.com>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
Cc: Jon Nettleton <jon@solid-run.com>,
Mikhail Anikin <mikhail.anikin@solid-run.com>,
Yazan Shhady <yazan.shhady@solid-run.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
Josua Mayer <josua@solid-run.com>
Subject: [PATCH v4 2/8] Input: ilitek_ts_i2c: fix warning with gpio controllers that sleep
Date: Mon, 01 Dec 2025 14:07:21 +0100 [thread overview]
Message-ID: <20251201-imx8mp-hb-iiot-v4-2-53a4cd6c21bf@solid-run.com> (raw)
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
The ilitek touchscreen driver uses the non-sleeping gpiod_set_value
function for reset.
Switch to using gpiod_set_value_cansleep() when controlling reset_gpio to
support GPIO providers that may sleep, such as I2C GPIO expanders.
Further switch the mdelay calls on the reset path to fsleep (preferred
in non-atomic contexts).
This fixes noisy complaints in kernel log for gpio providers that do
sleep.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
drivers/input/touchscreen/ilitek_ts_i2c.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
index 0dd632724a003..10e5530d6a5d0 100644
--- a/drivers/input/touchscreen/ilitek_ts_i2c.c
+++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
@@ -396,10 +396,10 @@ static const struct ilitek_protocol_map ptl_func_map[] = {
static void ilitek_reset(struct ilitek_ts_data *ts, int delay)
{
if (ts->reset_gpio) {
- gpiod_set_value(ts->reset_gpio, 1);
- mdelay(10);
- gpiod_set_value(ts->reset_gpio, 0);
- mdelay(delay);
+ gpiod_set_value_cansleep(ts->reset_gpio, 1);
+ fsleep(10000);
+ gpiod_set_value_cansleep(ts->reset_gpio, 0);
+ fsleep(delay * 1000);
}
}
--
2.51.0
next prev parent reply other threads:[~2025-12-01 13:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 13:07 [PATCH v4 0/8] arm64: dts: add description for solidrun imx8mp hummingboard-iiot Josua Mayer
2025-12-01 13:07 ` [PATCH v4 1/8] dt-bindings: arm: fsl: Add various solidrun i.mx8m boards Josua Mayer
2025-12-01 13:07 ` Josua Mayer [this message]
2025-12-01 13:07 ` [PATCH v4 3/8] arm64: dts: imx8mp-hummingboard-pulse/cubox-m: fix vmmc gpio polarity Josua Mayer
2025-12-01 13:07 ` [PATCH v4 4/8] arm64: dts: imx8mp-hummingboard-pulse: fix mini-hdmi dsi port reference Josua Mayer
2025-12-01 13:07 ` [PATCH v4 5/8] arm64: dts: imx8mp-sr-som: build dtbs with symbols for overlay support Josua Mayer
2025-12-01 13:07 ` [PATCH v4 6/8] arm64: dts: add description for solidrun imx8mp hummingboard-iiot Josua Mayer
2025-12-01 13:07 ` [PATCH v4 7/8] arm64: dts: add description for solidrun solidsense-n8 board Josua Mayer
2025-12-01 13:49 ` Andrew Lunn
2025-12-10 14:21 ` Josua Mayer
2025-12-01 13:07 ` [PATCH v4 8/8] arm64: dts: add description for solidrun i.mx8mm som and evb Josua Mayer
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=20251201-imx8mp-hb-iiot-v4-2-53a4cd6c21bf@solid-run.com \
--to=josua@solid-run.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jon@solid-run.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikhail.anikin@solid-run.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=yazan.shhady@solid-run.com \
/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;
as well as URLs for NNTP newsgroup(s).