Skip to content

Commit 7a2decc

Browse files
mcoquelin-stm32linusw
authored andcommitted
pinctrl: st: Fix irqmux handler
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 <linus.walleij@linaro.org> Cc: <stable@vger.kernel.org> #v3.15+ Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 1795cd9 commit 7a2decc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pinctrl/pinctrl-st.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ static void st_gpio_irqmux_handler(unsigned irq, struct irq_desc *desc)
14311431

14321432
status = readl(info->irqmux_base);
14331433

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

14371437
chained_irq_exit(chip, desc);

0 commit comments

Comments
 (0)