Skip to contentSkip to conversation

gpio: 104-idio-16: Disable IRQ on device probe

PATCH In review William Breathitt Gray 2 participants 2 messages Nov 22, 2015 – Nov 30, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: 104-idio-16: Disable IRQ on device probe

IRQ should be disabled on device probe so that the device IRQ is in a known starting state. If IRQ is not disabled, interrupts may be reported as handled by the IRQ handler, despite no irq_unmask calls made by the user.

---
 drivers/gpio/gpio-104-idio-16.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpio/gpio-104-idio-16.c +3 -0
index 81b6904..efe3ff7 100644
@@ -242,6 +242,9 @@ static int __init idio_16_probe(struct platform_device *pdev)
 		goto err_gpio_register;
 	}
 
+	/* Disable IRQ by default */
+	outb(0, base + 2);
+
 	err = gpiochip_irqchip_add(&idio16gpio->chip, &idio_16_irqchip, 0,
 		handle_edge_irq, IRQ_TYPE_NONE);
 	if (err) {
Signature · 1 line
2.4.10
#1 lore raw
Quoted 6 lines · William Breathitt Gray

IRQ should be disabled on device probe so that the device IRQ is in a known starting state. If IRQ is not disabled, interrupts may be reported as handled by the IRQ handler, despite no irq_unmask calls made by the user.

Patch applied.

Yours,
Linus Walleij