[PATCH] arm/tegra: convert tegra20 to GIC devicetree binding

Peter De Schrijver pdeschrijver at nvidia.com
Wed Nov 23 16:00:35 EST 2011


> > > But the WM8903 still has the same interrupt-parent as everything else,
> > > since it's inherited from /interrupt-parent and doesn't define its own.
> > > Perhaps this is a mistake?
> > 
> > Yes. I think this is a mistake. If we want the device tree to reflect the
> > hardware, I think the WM8903 node should specify the GPIO, not the IRQ
> > number.
> 
> Hmm. This somewhat goes back to the previous irq_to_gpio discussion...
> 
> The WM8903 driver only cares about having an interrupt. In this case at
> least, the driver never performs any GPIO-like manipulation on this
> interrupt line. As such, shouldn't the driver receive the interrupt ID
> to use?
> 

Maybe it should then. I guess also edge vs level and polarity need to be
specified?

> The rationale here is that while the WM8903's interrupt output is hooked
> to a GPIO input on Tegra systems, there's no reason to believe that it
> couldn't be hooked to a dedicated interrupt input pin on some other SoC
> (i.e. not a GPIO). In that case, there'd be no GPIO to pass to the driver.
> 
> Now perhaps what this means is that we need a DT binding for "the IRQ
> generated by this given GPIO pin", rather than encoding that interrupt
> number into the WM8903 node directly? That's certainly exactly what we
> do when creating the platform data in board files in this case.

I think we need to model the GPIO IRQs as a seperate interrupt controller.
That way the WM8903 node can refer to the GPIO IRQ as an IRQ without
hardcoding the global interrupt number, similar to the way we specify the
SPI number in the device nodes and not the global interrupt number.

Cheers,

Peter.


More information about the devicetree-discuss mailing list