Commit 2345b20f authored by Mathias Nyman's avatar Mathias Nyman Committed by Grant Likely

gpio/langwell_gpio: ack the correct bit for langwell gpio interrupts

The wrong bit was masked when acking langwell gpio interrupts.

Reason for maskig the wrong bit was probably because__ffs() and ffs() functions
return bit indexes differently (0..31 vs 1..32)

This fixes langwell based devices from hanging when a gpio interrupt is
triggered and undoes the breakage which occurred in change set
732063b9Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 58956ba2
...@@ -223,7 +223,7 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc) ...@@ -223,7 +223,7 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
gedr = gpio_reg(&lnw->chip, base, GEDR); gedr = gpio_reg(&lnw->chip, base, GEDR);
pending = readl(gedr); pending = readl(gedr);
while (pending) { while (pending) {
gpio = __ffs(pending) - 1; gpio = __ffs(pending);
mask = BIT(gpio); mask = BIT(gpio);
pending &= ~mask; pending &= ~mask;
/* Clear before handling so we can't lose an edge */ /* Clear before handling so we can't lose an edge */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment