Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: ilitek_ts_i2c - fix warning with gpio controllers that sleep

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>
Link: https://patch.msgid.link/20251201-imx8mp-hb-iiot-v4-2-53a4cd6c21bf@solid-run.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Josua Mayer and committed by
Dmitry Torokhov
a2c5ea42 ec8fce2a

+4 -4
+4 -4
drivers/input/touchscreen/ilitek_ts_i2c.c
··· 396 396 static void ilitek_reset(struct ilitek_ts_data *ts, int delay) 397 397 { 398 398 if (ts->reset_gpio) { 399 - gpiod_set_value(ts->reset_gpio, 1); 400 - mdelay(10); 401 - gpiod_set_value(ts->reset_gpio, 0); 402 - mdelay(delay); 399 + gpiod_set_value_cansleep(ts->reset_gpio, 1); 400 + fsleep(10000); 401 + gpiod_set_value_cansleep(ts->reset_gpio, 0); 402 + fsleep(delay * 1000); 403 403 } 404 404 } 405 405