[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120504124750.GL14230@opensource.wolfsonmicro.com>
Date: Fri, 4 May 2012 13:47:51 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@...com>
Cc: Samuel Ortiz <sameo@...ux.intel.com>, linux-kernel@...r.kernel.org,
Misael Lopez Cruz <misael.lopez@...com>,
Benoit Cousson <b-cousson@...com>,
devicetree-discuss@...ts.ozlabs.org, Liam Girdwood <lrg@...com>
Subject: Re: [PATCH 2/3] MFD: twl6040: Allocate IRQ numbers dynamically
On Fri, May 04, 2012 at 03:33:51PM +0300, Peter Ujfalusi wrote:
> On 05/04/2012 03:17 PM, Mark Brown wrote:
> > The latter, and also just any driver that delivers an interrupt via a
> > GPIO on OMAP - if the GPIO IRQ numbers are all dynamically allocated
> > then it gets hard to register an off-chip device and tell it which
> > interrupt to request.
> For GPIO IRQ there's the gpio_to_irq() call which returns the mapped IRQ
> number for the given GPIO.
This doesn't really work for board files, though - you can only call
gpio_to_irq() at runtime so if you're statically registering the devices
on the board you'd need to make the structures non-const, manage to find
the GPIO controller at runtime then do the lookup, update the struct and
finally register the device.
> If there is "irq expander" type of chip I assume it would have similar
> way to get the IRQ number based on either GPIO number or some other
> enumeration value.
No, there's no generic interface for this.
> The twl6040 does not have such a feature. The interrupts are generated
> internally and it has one IRQ line towards the host. We have nested
> interrupts for the childs (plug detect is handled by ASoC codec, Vibra
> overcurrent is handled by the vibra driver, etc).
OK, that's fine then - you should put this in the changelog to make it
clear that there are no external users who could be affected.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists