Skip to content

Commit

Permalink
pinctrl: st: Fix irqmux handler
Browse files Browse the repository at this point in the history
st_gpio_irqmux_handler() reads the status register to find out
which banks inside the controller have pending IRQs.
For each banks having pending IRQs, it calls the corresponding handler.

Problem is that current code restricts the number of possible banks inside the
controller to ST_GPIO_PINS_PER_BANK. This define represents the number of pins
inside a bank, so it shouldn't be used here.

On STiH407, PIO_FRONT0 controller has 10 banks, so IRQs pending in the two
last banks (PIO18 & PIO19) aren't handled.

This patch replace ST_GPIO_PINS_PER_BANK by the number of banks inside the
controller.

Cc: Linus Walleij <[email protected]>
Cc: <[email protected]> #v3.15+
Acked-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Maxime Coquelin <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
mcoquelin-stm32 authored and linusw committed Jul 15, 2014
1 parent 1795cd9 commit 7a2decc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-st.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ static void st_gpio_irqmux_handler(unsigned irq, struct irq_desc *desc)

status = readl(info->irqmux_base);

for_each_set_bit(n, &status, ST_GPIO_PINS_PER_BANK)
for_each_set_bit(n, &status, info->nbanks)
__gpio_irq_handler(&info->banks[n]);

chained_irq_exit(chip, desc);
Expand Down

0 comments on commit 7a2decc

Please sign in to comment.