[PATCH] gpio: tegra: fix irq_release_resources calling enable instead of disable

Samasth Norway Ananda posted 1 patch 2 months, 1 week ago
There is a newer version of this series
drivers/gpio/gpio-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] gpio: tegra: fix irq_release_resources calling enable instead of disable
Posted by Samasth Norway Ananda 2 months, 1 week ago
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>
---
 drivers/gpio/gpio-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 15a5762a82c2..b14052fe64ac 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -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)
-- 
2.50.1
Re: [PATCH] gpio: tegra: fix irq_release_resources calling enable instead of disable
Posted by Bartosz Golaszewski 2 months ago
On Tue, 07 Apr 2026 14:02:47 -0700, Samasth Norway Ananda wrote:
> 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.
> 
> 
> [...]

Applied, thanks!

[1/1] gpio: tegra: fix irq_release_resources calling enable instead of disable
      https://git.kernel.org/brgl/c/1561d96f5f55c1bca9ff047ace5813f4f244eea6

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>