Interrupts on GPIO

Grant Likely grant.likely at secretlab.ca
Wed Apr 1 08:38:20 EST 2009


On Tue, Mar 31, 2009 at 2:59 PM, Yann Pelletier
<ypelletier at haivision.com> wrote:
>> Message: 7
>> Date: Mon, 30 Mar 2009 10:32:17 -0600
>> From: Grant Likely <grant.likely at secretlab.ca>
>> Subject: > To: Yann Pelletier <ypelletier at haivision.com>
>> Cc: "linuxppc-dev at ozlabs.org" <linuxppc-dev at ozlabs.org>
>> Message-ID:
>>       <fa686aa40903300932p2c92110g2907bb7bf80d44d at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> On Mon, Mar 30, 2009 at 9:57 AM, Yann Pelletier
>> <ypelletier at haivision.com> wrote:
>> >
>> > Hi,
>> > I'd like to add supports for interrupts handling from GPIO controller.
>> ?Some of these interrupts are from I2C devices and some others are from
>> SPI devices.
>> >
>> > What is the best approach to enable interrupts handling for those
>> devices through GPIO.
>>
>> Modify the GPIO driver to also be a cascaded IRQ driver (see
>> http://patchwork.ozlabs.org/patch/21914/ for an example).
>>
>
> I've looked at the patch but I wonder if this would be applicable to the MPC8313.  If my understanding is good, in the MPC52xx you have 8 gpio only interrupts and 8 gpio/gpt.  With the MPC8313, each GPIO can act as an interrupt but they are all muxed to only 1 interrupt in the IPIC.  So I'm concern about making the GPIO controller act as an interrupt controller.

Why?  The situation really isn't any different.  Using the GPIO
controller hardware as a Linux interrupt controller means that other
drivers can just use it without having to do anything special.  It's
just and IRQ.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the Linuxppc-dev mailing list