]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: tegra: fix irq_release_resources calling enable instead of disable
authorSamasth Norway Ananda <samasth.norway.ananda@oracle.com>
Tue, 7 Apr 2026 21:02:47 +0000 (14:02 -0700)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Thu, 9 Apr 2026 08:35:33 +0000 (10:35 +0200)
tegra_gpio_irq_release_resources() erroneously calls tegra_gpio_enable()
instead of tegra_gpio_disable(). When IRQ resources are released, the
GPIO configuration bit (CNF) should be cleared to deconfigure the pin as
a GPIO. Leaving it enabled wastes power and can cause unexpected behavior
if the pin is later reused for an alternate function via pinctrl.

Fixes: 66fecef5bde0 ("gpio: tegra: Convert to gpio_irq_chip")
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Link: https://patch.msgid.link/20260407210247.1737938-1-samasth.norway.ananda@oracle.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-tegra.c

index 15a5762a82c25be5091e8bbbfb13ebdd26eab1a7..b14052fe64ac69bcc485b6ddcaa3237d0ecf6ab3 100644 (file)
@@ -595,7 +595,7 @@ static void tegra_gpio_irq_release_resources(struct irq_data *d)
        struct tegra_gpio_info *tgi = gpiochip_get_data(chip);
 
        gpiochip_relres_irq(chip, d->hwirq);
-       tegra_gpio_enable(tgi, d->hwirq);
+       tegra_gpio_disable(tgi, d->hwirq);
 }
 
 static void tegra_gpio_irq_print_chip(struct irq_data *d, struct seq_file *s)