diff mbox series

[RFC,3/3] gpio: ep93xx: specify gpio_irq_chip->first

Message ID 20201224112203.7174-4-nikita.shubin@maquefel.me
State New
Headers show
Series gpio: ep93xx: convert to multi irqchips | expand

Commit Message

Nikita Shubin Dec. 24, 2020, 11:22 a.m. UTC
Port F irq's should be statically mapped to EP93XX_GPIO_F_IRQ_BASE.

So we need to specify girq->first otherwise:

"If device tree is used, then first_irq will be 0 and
irqs get mapped dynamically on the fly"

And that's not the thing we want.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 drivers/gpio/gpio-ep93xx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Linus Walleij Dec. 27, 2020, 9:22 p.m. UTC | #1
On Thu, Dec 24, 2020 at 12:22 PM Nikita Shubin
<nikita.shubin@maquefel.me> wrote:

> Port F irq's should be statically mapped to EP93XX_GPIO_F_IRQ_BASE.
>
> So we need to specify girq->first otherwise:
>
> "If device tree is used, then first_irq will be 0 and
> irqs get mapped dynamically on the fly"
>
> And that's not the thing we want.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

We can only fix this properly once we convert the platform
to device tree. (Along with making the irqchip hierarchical.)

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 90afe07213ce..a321a7441294 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -402,6 +402,7 @@  static int ep93xx_gpio_add_f_irq_chip(struct gpio_chip *gc,
 	}
 	girq->default_type = IRQ_TYPE_NONE;
 	girq->handler = handle_level_irq;
+	girq->first = EP93XX_GPIO_F_IRQ_BASE;
 
 	return 0;
 }