Skip to content

Commit 1d2da79

Browse files
bijudasgeertu
authored andcommitted
pinctrl: renesas: rzg2l: Avoid configuring ISEL in gpio_irq_{en,dis}able*(
Currently on irq_disable(), we are disabling gpio interrupt enable(ISEL). That means the pin is just gpio input and not gpio input interrupt any more. So, move configuring ISEL in rzg2l_gpio_child_to_parent_hwirq()/ rzg2l_gpio_irq_domain_free() so that the pin will be gpioint always even during irq_disable(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20240206135318.165426-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent d3c4929 commit 1d2da79

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,22 +1836,18 @@ static void rzg2l_gpio_irq_endisable(struct rzg2l_pinctrl *pctrl,
18361836
static void rzg2l_gpio_irq_disable(struct irq_data *d)
18371837
{
18381838
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1839-
struct rzg2l_pinctrl *pctrl = container_of(gc, struct rzg2l_pinctrl, gpio_chip);
18401839
unsigned int hwirq = irqd_to_hwirq(d);
18411840

18421841
irq_chip_disable_parent(d);
1843-
rzg2l_gpio_irq_endisable(pctrl, hwirq, false);
18441842
gpiochip_disable_irq(gc, hwirq);
18451843
}
18461844

18471845
static void rzg2l_gpio_irq_enable(struct irq_data *d)
18481846
{
18491847
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1850-
struct rzg2l_pinctrl *pctrl = container_of(gc, struct rzg2l_pinctrl, gpio_chip);
18511848
unsigned int hwirq = irqd_to_hwirq(d);
18521849

18531850
gpiochip_enable_irq(gc, hwirq);
1854-
rzg2l_gpio_irq_endisable(pctrl, hwirq, true);
18551851
irq_chip_enable_parent(d);
18561852
}
18571853

@@ -1933,6 +1929,7 @@ static int rzg2l_gpio_child_to_parent_hwirq(struct gpio_chip *gc,
19331929
goto err;
19341930
}
19351931

1932+
rzg2l_gpio_irq_endisable(pctrl, child, true);
19361933
pctrl->hwirq[irq] = child;
19371934
irq += RZG2L_TINT_IRQ_START_INDEX;
19381935

@@ -1976,6 +1973,7 @@ static void rzg2l_gpio_irq_domain_free(struct irq_domain *domain, unsigned int v
19761973

19771974
for (i = 0; i < RZG2L_TINT_MAX_INTERRUPT; i++) {
19781975
if (pctrl->hwirq[i] == hwirq) {
1976+
rzg2l_gpio_irq_endisable(pctrl, hwirq, false);
19791977
rzg2l_gpio_free(gc, hwirq);
19801978
spin_lock_irqsave(&pctrl->bitmap_lock, flags);
19811979
bitmap_release_region(pctrl->tint_slot, i, get_order(1));

0 commit comments

Comments
 (0)