]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gpio: 104-idio-16: Clear pending interrupt in IRQ handler
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Thu, 3 Dec 2015 01:23:04 +0000 (20:23 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 10 Dec 2015 18:25:21 +0000 (19:25 +0100)
commit12b61c9d7e0750f2569392999fcfa85778185b06
tree536a257d987422958a2fd39236450546602476ad
parent01821412eeb10ca996da0824d2d56d9a13b5c013
gpio: 104-idio-16: Clear pending interrupt in IRQ handler

The ACCES 104-IDIO-16 uses a single interrupt to indicate a possible
change-of-state in any of the digital input lines. As such, only a
single write to the device's "Clear Interrupt" register is necessary to
acknowledge the IRQ for all respective GPIO.

This patch moves the "Clear Interrupt" register write operation from the
irq_ack callback to the IRQ handler function, wherefore each interrupt
may be cleared respectively by executing a single outb call at the end
of the idio_16_irq_handler function, rather than multiple redundant outb
calls as a result of the generic_handle_irq call for each masked GPIO.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-104-idio-16.c