diff options
| author | Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> | 2026-08-17 21:56:54 +0300 |
|---|---|---|
| committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2026-09-09 10:51:29 +0200 |
| commit | c0de88659b68402ed7e53fb998a058ef430c787b (patch) | |
| tree | 4270fa87a9cd0f6809832623e3a357efc487f839 /drivers/pinctrl | |
| parent | ec5202ccfa24791acf64146d5bac6b63ce234f95 (diff) | |
| download | linux-next-c0de88659b68402ed7e53fb998a058ef430c787b.tar.gz linux-next-c0de88659b68402ed7e53fb998a058ef430c787b.zip | |
pinctrl: renesas: rzt2h: Fix used_irqs indexing in clear path
struct rzt2h_pinctrl::used_irqs is supposed to be indexed based on the
parent IRQ number. Do the translation using rzt2h_gpio_irq_map and
clear it properly.
Cc: stable@kernel.org
Fixes: 829dde3369a9 ("pinctrl: renesas: rzt2h: Add GPIO IRQ chip to handle interrupts")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260817185700.322370-2-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/pinctrl')
| -rw-r--r-- | drivers/pinctrl/renesas/pinctrl-rzt2h.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pinctrl/renesas/pinctrl-rzt2h.c b/drivers/pinctrl/renesas/pinctrl-rzt2h.c index eb70aee39f1a..a37f1e399446 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzt2h.c +++ b/drivers/pinctrl/renesas/pinctrl-rzt2h.c @@ -1050,8 +1050,13 @@ static void rzt2h_gpio_irq_domain_free(struct irq_domain *domain, unsigned int v irq_hw_number_t hwirq = irqd_to_hwirq(d); u8 port = RZT2H_PIN_ID_TO_PORT(hwirq); u8 pin = RZT2H_PIN_ID_TO_PIN(hwirq); + u8 parent_irq; + + parent_irq = rzt2h_gpio_irq_map[hwirq]; + if (parent_irq < RZT2H_INTERRUPTS_START) + return; - if (test_and_clear_bit(hwirq - RZT2H_INTERRUPTS_START, pctrl->used_irqs)) + if (test_and_clear_bit(parent_irq - RZT2H_INTERRUPTS_START, pctrl->used_irqs)) rzt2h_pinctrl_set_gpio_en(pctrl, port, pin, false); irq_domain_free_irqs_common(domain, virq, nr_irqs); |
