summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-104-idio-16.c
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2015-11-22 11:38:55 -0500
committerLinus Walleij <linus.walleij@linaro.org>2015-11-30 14:42:06 +0100
commitfb50cdfeeda868ae2bfe7ec2e0afebff53eca2d5 (patch)
tree6e7cebeae7cba9f05309ac5fe3d5fc55c9698142 /drivers/gpio/gpio-104-idio-16.c
parentd9110e9ce7ed98b24fa58764833e89a430843c21 (diff)
downloadlinux-0-day-fb50cdfeeda868ae2bfe7ec2e0afebff53eca2d5.tar.gz
linux-0-day-fb50cdfeeda868ae2bfe7ec2e0afebff53eca2d5.tar.xz
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. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-104-idio-16.c')
-rw-r--r--drivers/gpio/gpio-104-idio-16.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104-idio-16.c
index 81b6904bdfe6e..efe3ff7d574e3 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) {