[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding an interrupt locator to the GPIO, I2C and SPI buses
On Fri, 19 Apr 2013 10:01:46 +0200, Manuel Bouyer wrote:
> On Thu, Apr 18, 2013 at 05:31:41PM +0200, Pierre Pronchery wrote:
>> Another option could be to:
>> - add a call returning the corresponding interrupt for a given pin, eg
>> gpio_to_irq() (and return -1 when the requested type isn't supported)
>> - use intr_establish() as for regular drivers.
>> That's what Linux does, as far as I could tell from the OMAP code that
>> I've read there.
> That would be a problem if the GPIO module has less interrupt lines than
> interrupt sources (as in the AM335x: 32 GPIO per module but only 2
> interrupt lines to the PIC):
Tell me if I'm wrong, but I don't think you understood what's happening
here: the GPIO interrupt range that I described on OMAP is virtual.
Therefore, gpio_to_irq() would return a virtual interruption number.
The underlying GPIO bus driver would be in charge to determine which pin
really triggered the interrupt, and tell the corresponding driver. The
OMAP GPIO driver does exactly this already.
Main Index |
Thread Index |