[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5ca82b7dd4c17ea358a1ea30bb34a3e31828b2b2.1398844809.git.toby@tismith.id.au>
Date: Wed, 30 Apr 2014 18:01:40 +1000
From: Toby Smith <toby@...mith.id.au>
To: linus.walleij@...aro.org, gnurou@...il.com,
grant.likely@...aro.org, robh+dt@...nel.org
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, Toby Smith <toby@...mith.id.au>
Subject: [PATCH 1/2] gpio: pca953x: return IRQ_NONE when appropriate
The irq handler should return IRQ_NONE or IRQ_HANDLED to report
if we have handled the interrupt.
Signed-off-by: Toby Smith <toby@...mith.id.au>
---
drivers/gpio/gpio-pca953x.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index d550d8e..83cc2c8 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -503,10 +503,11 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
struct pca953x_chip *chip = devid;
u8 pending[MAX_BANK];
u8 level;
+ unsigned nhandled = 0;
int i;
if (!pca953x_irq_pending(chip, pending))
- return IRQ_HANDLED;
+ return IRQ_NONE;
for (i = 0; i < NBANK(chip); i++) {
while (pending[i]) {
@@ -514,10 +515,11 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
handle_nested_irq(irq_find_mapping(chip->domain,
level + (BANK_SZ * i)));
pending[i] &= ~(1 << level);
+ nhandled++;
}
}
- return IRQ_HANDLED;
+ return (nhandled > 0) ? IRQ_HANDLED : IRQ_NONE;
}
static int pca953x_gpio_irq_map(struct irq_domain *d, unsigned int irq,
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists