* [PATCH] gpio: 104-idio-16: Disable IRQ on device probe
@ 2015-11-22 16:38 William Breathitt Gray
2015-11-30 13:42 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: William Breathitt Gray @ 2015-11-22 16:38 UTC (permalink / raw)
To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel
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.
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
drivers/gpio/gpio-104-idio-16.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104-idio-16.c
index 81b6904..efe3ff7 100644
--- a/drivers/gpio/gpio-104-idio-16.c
+++ b/drivers/gpio/gpio-104-idio-16.c
@@ -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) {
--
2.4.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: 104-idio-16: Disable IRQ on device probe
2015-11-22 16:38 [PATCH] gpio: 104-idio-16: Disable IRQ on device probe William Breathitt Gray
@ 2015-11-30 13:42 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2015-11-30 13:42 UTC (permalink / raw)
To: William Breathitt Gray
Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
On Sun, Nov 22, 2015 at 5:38 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:
> 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.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-30 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-22 16:38 [PATCH] gpio: 104-idio-16: Disable IRQ on device probe William Breathitt Gray
2015-11-30 13:42 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).