linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO lines are masked
@ 2016-01-20 18:36 William Breathitt Gray
  0 siblings, 0 replies; 2+ messages in thread
From: William Breathitt Gray @ 2016-01-20 18:36 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel

Please ignore this patch.

This device cannot differentiate between its own and other devices'
interrupt requests. IRQ should not be shared with this device.

William Breathitt Gray

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO lines are masked
@ 2016-01-20 18:20 William Breathitt Gray
  0 siblings, 0 replies; 2+ messages in thread
From: William Breathitt Gray @ 2016-01-20 18:20 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel

If the irq_mask member has a value of 0, then interrupts are disabled on
the device. Therefore, IRQ_NONE should be returned if the irq_mask
member is 0.

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 4d69b50..09fe032 100644
--- a/drivers/gpio/gpio-104-idio-16.c
+++ b/drivers/gpio/gpio-104-idio-16.c
@@ -175,6 +175,9 @@ static irqreturn_t idio_16_irq_handler(int irq, void *dev_id)
 	struct gpio_chip *const chip = &idio16gpio->chip;
 	int gpio;
 
+	if (!idio16gpio->irq_mask)
+		return IRQ_NONE;
+
 	for_each_set_bit(gpio, &idio16gpio->irq_mask, chip->ngpio)
 		generic_handle_irq(irq_find_mapping(chip->irqdomain, gpio));
 
-- 
2.4.10


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-20 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 18:36 [PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO lines are masked William Breathitt Gray
  -- strict thread matches above, loose matches on Subject: below --
2016-01-20 18:20 William Breathitt Gray

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).