Skip to content

Commit 7fb1fe3

Browse files
committed
Merge tag 'renesas-pinctrl-fixes-for-v6.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into fixes
pinctrl: renesas: Fixes for v6.9 (take two) - Fix interrupt configuration on RZ/G2L after s2ram. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 parents 398c995 + 02cd2d3 commit 7fb1fe3

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,9 @@ static void rzg2l_gpio_irq_restore(struct rzg2l_pinctrl *pctrl)
20452045

20462046
for (unsigned int i = 0; i < RZG2L_TINT_MAX_INTERRUPT; i++) {
20472047
struct irq_data *data;
2048+
unsigned long flags;
20482049
unsigned int virq;
2050+
int ret;
20492051

20502052
if (!pctrl->hwirq[i])
20512053
continue;
@@ -2063,17 +2065,18 @@ static void rzg2l_gpio_irq_restore(struct rzg2l_pinctrl *pctrl)
20632065
continue;
20642066
}
20652067

2066-
if (!irqd_irq_disabled(data)) {
2067-
unsigned long flags;
2068-
2069-
/*
2070-
* This has to be atomically executed to protect against a concurrent
2071-
* interrupt.
2072-
*/
2073-
raw_spin_lock_irqsave(&pctrl->lock.rlock, flags);
2068+
/*
2069+
* This has to be atomically executed to protect against a concurrent
2070+
* interrupt.
2071+
*/
2072+
raw_spin_lock_irqsave(&pctrl->lock.rlock, flags);
2073+
ret = rzg2l_gpio_irq_set_type(data, irqd_get_trigger_type(data));
2074+
if (!ret && !irqd_irq_disabled(data))
20742075
rzg2l_gpio_irq_enable(data);
2075-
raw_spin_unlock_irqrestore(&pctrl->lock.rlock, flags);
2076-
}
2076+
raw_spin_unlock_irqrestore(&pctrl->lock.rlock, flags);
2077+
2078+
if (ret)
2079+
dev_crit(pctrl->dev, "Failed to set IRQ type for virq=%u\n", virq);
20772080
}
20782081
}
20792082

0 commit comments

Comments
 (0)