Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274895 > unrolled thread

[PATCH] gpio: 104-idio-16: Disable IRQ on device probe

Started byWilliam Breathitt Gray <vilhelm.gray@gmail.com>
First post2015-11-22 17:40 +0100
Last post2015-11-30 14:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] gpio: 104-idio-16: Disable IRQ on device probe William Breathitt Gray <vilhelm.gray@gmail.com> - 2015-11-22 17:40 +0100
    Re: [PATCH] gpio: 104-idio-16: Disable IRQ on device probe Linus Walleij <linus.walleij@linaro.org> - 2015-11-30 14:50 +0100

#1274895 — [PATCH] gpio: 104-idio-16: Disable IRQ on device probe

FromWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Date2015-11-22 17:40 +0100
Subject[PATCH] gpio: 104-idio-16: Disable IRQ on device probe
Message-ID<qxFQd-6mz-5@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1279884

FromLinus Walleij <linus.walleij@linaro.org>
Date2015-11-30 14:50 +0100
Message-ID<qAx08-4hY-57@gated-at.bofh.it>
In reply to#1274895
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web