Devicetree
 help / color / mirror / Atom feed
* RE: [PATCH] arm/tegra: convert tegra20 to GIC devicetree binding
       [not found]         ` <20111121122212.GL19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
@ 2011-11-21 17:20           ` Stephen Warren
       [not found]             ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C0E5-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2011-11-21 17:20 UTC (permalink / raw)
  To: Peter De Schrijver
  Cc: Russell King, Colin Cross, Olof Johansson, Marc Dietrich,
	Grant Likely,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

Peter De Schrijver wrote at Monday, November 21, 2011 5:22 AM:
> On Fri, Nov 18, 2011 at 05:25:33PM +0100, Stephen Warren wrote:
> > Peter De Schrijver wrote at Friday, November 18, 2011 5:04 AM:
> > > On Thu, Nov 17, 2011 at 07:51:35PM +0100, Stephen Warren wrote:
> > > > Peter De Schrijver wrote at Thursday, November 17, 2011 8:07 AM:
> > > > > Convert tegra20 IRQ intialization to the GIC devicetree binding. Modify the
> > > > > interrupt definitions in the dts files according to
> > > > > Documentation/devicetree/bindings/arm/gic.txt
> > > > >
> > > > > Signed-off-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > > >
> > > > tegra-harmony.dts contains an interrupts property that wasn't updated,
> > > > for the WM8903 codec.
> > >
> > > But that's a GPIO interrupt no?
> >
> > The interrupt line from codec to Tegra is a GPIO, yes.
> >
> > 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?

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.

-- 
nvpublic

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm/tegra: convert tegra20 to GIC devicetree binding
       [not found]             ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C0E5-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
@ 2011-11-23  5:00               ` Peter De Schrijver
       [not found]                 ` <20111123050012.GS19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Peter De Schrijver @ 2011-11-23  5:00 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Russell King, Colin Cross, Olof Johansson, Marc Dietrich,
	Grant Likely,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

> > > 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] arm/tegra: convert tegra20 to GIC devicetree binding
       [not found]                 ` <20111123050012.GS19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
@ 2011-11-23 17:25                   ` Stephen Warren
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2011-11-23 17:25 UTC (permalink / raw)
  To: Peter De Schrijver
  Cc: Russell King,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marc Dietrich,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Colin Cross,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

Peter De Schrijver wrote at Tuesday, November 22, 2011 10:00 PM:
...
> 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.

Yes, you're right.

I'd originally thought that the GPIO IRQs fed directly into the GIC, but
now that I read the docs, I see that the GPIO controller really is an
interrupt aggregator/controller.

-- 
nvpublic

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-23 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1321542430-17971-1-git-send-email-pdeschrijver@nvidia.com>
     [not found] ` <74CDBE0F657A3D45AFBB94109FB122FF1740D74C1E@HQMAIL01.nvidia.com>
     [not found]   ` <20111118120352.GZ19069@tbergstrom-lnx.Nvidia.com>
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF1740D74E63@HQMAIL01.nvidia.com>
     [not found]       ` <20111121122212.GL19069@tbergstrom-lnx.Nvidia.com>
     [not found]         ` <20111121122212.GL19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2011-11-21 17:20           ` [PATCH] arm/tegra: convert tegra20 to GIC devicetree binding Stephen Warren
     [not found]             ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C0E5-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-23  5:00               ` Peter De Schrijver
     [not found]                 ` <20111123050012.GS19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2011-11-23 17:25                   ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox