Message ID | 20210127104617.1173-4-nikita.shubin@maquefel.me |
---|---|
State | New |
Headers | show |
Series | gpio: ep93xx: fixes series patch | expand |
On Wed, Jan 27, 2021 at 11:46 AM 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> True, to satisfy old board file-type machines we unfortunately have to do this. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
Hi! On Wed, 2021-01-27 at 13:46 +0300, Nikita Shubin 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> I have no code out-of-the-box to test the GPIO interrupts on EP93xx, so I just did a bootup with this patch. But the change looks fine to me: Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> > --- > drivers/gpio/gpio-ep93xx.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c > index 2eea02c906e0..9c3d049e5af7 100644 > --- a/drivers/gpio/gpio-ep93xx.c > +++ b/drivers/gpio/gpio-ep93xx.c > @@ -430,6 +430,7 @@ static int ep93xx_gpio_add_bank(struct gpio_chip > *gc, > girq->default_type = IRQ_TYPE_NONE; > girq->handler = handle_level_irq; > gc->to_irq = ep93xx_gpio_f_to_irq; > + girq->first = EP93XX_GPIO_F_IRQ_BASE; > } > > return devm_gpiochip_add_data(dev, gc, epg);
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index 2eea02c906e0..9c3d049e5af7 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -430,6 +430,7 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; gc->to_irq = ep93xx_gpio_f_to_irq; + girq->first = EP93XX_GPIO_F_IRQ_BASE; } return devm_gpiochip_add_data(dev, gc, epg);
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(+)