]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Input: atmel_mxt_ts - allow reset GPIO to sleep
authorMarek Vasut <marek.vasut@mailbox.org>
Sun, 5 Oct 2025 02:33:10 +0000 (04:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:41 +0000 (11:56 +0200)
commit c7866ee0a9ddd9789faadf58cdac6abd7aabf045 upstream.

The reset GPIO is not toggled in any critical section where it couldn't
sleep, allow the reset GPIO to sleep. This allows the driver to operate
reset GPIOs connected to I2C GPIO expanders.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Link: https://lore.kernel.org/r/20251005023335.166483-1-marek.vasut@mailbox.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/touchscreen/atmel_mxt_ts.c

index ccecd1441f0bec1c59a4d1d8567a286df8b6de77..b31d2607e1143e9daea3934a46146d24c15839e5 100644 (file)
@@ -3239,7 +3239,7 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
        if (data->reset_gpio) {
                /* Wait a while and then de-assert the RESET GPIO line */
                msleep(MXT_RESET_GPIO_TIME);
-               gpiod_set_value(data->reset_gpio, 0);
+               gpiod_set_value_cansleep(data->reset_gpio, 0);
                msleep(MXT_RESET_INVALID_CHG);
        }