[PATCH v2 04/11] Input: ilitek_ts_i2c: fix warning with gpio controllers that sleep
Frank Li
Frank.li at nxp.com
Fri Nov 7 07:58:21 PST 2025
On Fri, Nov 07, 2025 at 12:46:11PM +0100, Josua Mayer wrote:
> The ilitek touchscreen driver uses the non-sleeping gpiod_set_value
> function for reset.
>
> When the connected gpio controller needs to sleep as is common for i2c
> based expanders, this causes noisy complaints in kernel log.
>
> Reset is not time-critical, switch to the gpiod_set_value_cansleep
> variant.
Suggest use simple words
Switch to using gpiod_set_value_cansleep() when controlling reset_gpio to
support GPIO providers that may sleep, such as I2C GPIO expanders.
Frank
>
> Signed-off-by: Josua Mayer <josua at solid-run.com>
> ---
> drivers/input/touchscreen/ilitek_ts_i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
> index 0dd632724a003..8c5a54b336816 100644
> --- a/drivers/input/touchscreen/ilitek_ts_i2c.c
> +++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
> @@ -396,9 +396,9 @@ 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);
> + gpiod_set_value_cansleep(ts->reset_gpio, 1);
> mdelay(10);
> - gpiod_set_value(ts->reset_gpio, 0);
> + gpiod_set_value_cansleep(ts->reset_gpio, 0);
> mdelay(delay);
> }
> }
>
> --
> 2.51.0
>
More information about the linux-arm-kernel
mailing list