]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: pca953x: mask interrupts in irq shutdown
authorMartin Larsson <martin.larsson@actia.se>
Wed, 21 Jan 2026 12:57:22 +0000 (12:57 +0000)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 27 Jan 2026 19:28:00 +0000 (20:28 +0100)
In the existing implementation irq_shutdown does not mask the interrupts
in hardware. This can cause spurious interrupts from the IO expander.
Add masking to irq_shutdown to prevent spurious interrupts.

Cc: stable@vger.kernel.org
Signed-off-by: Martin Larsson <martin.larsson@actia.se>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://lore.kernel.org/r/20260121125631.2758346-1-martin.larsson@actia.se
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-pca953x.c

index 8727ae54bc578b7dfd34ae5f0ccf770e7dc0fb9c..f93a3dbb2daaf3db8558aa5c080caca51fb66e8b 100644 (file)
@@ -914,6 +914,8 @@ static void pca953x_irq_shutdown(struct irq_data *d)
        clear_bit(hwirq, chip->irq_trig_fall);
        clear_bit(hwirq, chip->irq_trig_level_low);
        clear_bit(hwirq, chip->irq_trig_level_high);
+
+       pca953x_irq_mask(d);
 }
 
 static void pca953x_irq_print_chip(struct irq_data *data, struct seq_file *p)