Re: [PATCH] gpio: Add Tegra186 support

From: Thierry Reding
Date: Wed Nov 23 2016 - 14:44:41 EST


On Wed, Nov 23, 2016 at 02:30:45PM +0100, Linus Walleij wrote:
> On Tue, Nov 22, 2016 at 6:55 PM, Thierry Reding
> <thierry.reding@xxxxxxxxx> wrote:
>
> > From: Thierry Reding <treding@xxxxxxxxxx>
> >
> > Tegra186 has two GPIO controllers that are largely register compatible
> > between one another but are completely different from the controller
> > found on earlier generations.
> >
> > Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
>
> I would prefer if you could try to convert this driver to use
> CONFIG_GPIOLIB_IRQCHIP and install a chained interrupt
> handler with gpiochip_irqchio_add() + gpiolib_set_chained_irqchip().
> It would save us so much trouble and so much complicated
> code to maintain for this custom irqdomain.
>
> I suggest you to look into the mechanisms mentioned in my
> previous mail for how to poke holes in the single linear
> irqdomain used by this mechanism.
>
> As it seems, you only have one parent interrupt with all
> these IRQs cascading off it as far as I can tell.

Like I said in other email, I don't think this will work because the
GPIOLIB_IRQCHIP support seems to be limited to cases where a single
parent interrupt is used. We could possibly live with a single IRQ
handler and data, but we definitely need to request multiple IRQs if
we want to be able to use all GPIOs as interrupts.

Thierry

Attachment: signature.asc
Description: PGP signature