Re: [PATCH] pinctrl: renesas: rzg2l: Always call rzg2l_gpio_request() for interrupt pins
From: Lad, Prabhakar
Date: Thu Oct 10 2024 - 15:53:17 EST
Hi Linus,
On Thu, Oct 10, 2024 at 8:47 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>
> On Wed, Oct 9, 2024 at 10:27 AM Lad, Prabhakar
> <prabhakar.csengg@xxxxxxxxx> wrote:
> > On Wed, Oct 9, 2024 at 9:11 AM claudiu beznea <claudiu.beznea@xxxxxxxxx> wrote:
>
> > > All these ports are hogs to configure them as input. Removing the hog
> > > property make this patch work but I'm not sure this is the right approach
> > > (see below diff).
> > >
> > I have dropped a query [0] to GPIO maintainers to check on the correct approach.
> >
> > https://lore.kernel.org/all/CA+V-a8vxUjTWccV-wLgy5CJiFYfEMsx-f+8weCJDP6uD_dh4AA@xxxxxxxxxxxxxx/
>
> Yeah I replied, the callbacks in struct irq_chip rzg2l_gpio_irqchip
> should be calling the following callbacks:
>
Sorry I wanted to do some poc before I responded to your email.
> /* lock/unlock as IRQ */
> int gpiochip_lock_as_irq(struct gpio_chip *gc, unsigned int offset);
> void gpiochip_unlock_as_irq(struct gpio_chip *gc, unsigned int offset);
>
> In its
> .irq_request_resources and .irq_release_resources callbacks.
>
> And it currently doesn't even define these callbacks.
>
> If the driver was using the GPIOLIB_IRQCHIP and adding the
> irqchip in the standard way along with the gpiochip, this would
> not be a problem.
>
> Can you look into simply using GPIOLIB_IRQCHIP like most
> other drivers as well?
>
Thanks for the pointers, I'll investigate and add support for it.
Cheers,
Prabhakar