Can I register an IRQ with any GPIO line?
Are there specific GPIO pins that are set up to be an IRQ that I should be
I am a hardware guy so I'm not very familiar with the kernel.
I am trying to find a gpio line that I can connect to a supervisor chip that
will tell the gumstix to shutdown when the board is losing power.
I was looking at the post below, but couldn't figure out if I should be
using a specific gpio pin as an interrupt or if I can just choose any line I
want that isn't being used.
Thanks for your help,
On Thu, Sep 16, 2010 at 5:46 PM, Derek Nielson <dereknielson@...> wrote:
> Can I register an IRQ with any GPIO line?
> Are there specific GPIO pins that are set up to be an IRQ that I should be
I think all GPIO's can be used as IRQs. There may be some exceptions,
but I'm not aware of any.
The convention in the link you provided looks correct -- generally you
have to translate the GPIO to an IRQ, then request that IRQ.
irq = gpio_to_irq(gpio);
request_irq(irq, handler, IRQF_TRIGGER_FALLING,
> I think all GPIO's can be used as IRQs. There may be some exceptions,
> but I'm not aware of any.
A minor follow up on this one for the future. All GPIOs on OMAP can be used
for interrupts. One minor note is, that the GPIOs 0 to 31 can wake up the
system even from the lowest power-state (wakeup clock/domain), while the
others have to have the peripheral clock/domain running. For most practical
use this isn't a real problem, but in case you really care about power
saving this might be worth considering. More info to be found in the GPIO
chapter of the OMAP3 TRM (spruf98)...
SSC Solutions ApS - Denmark - http://www.ssc-solutions.dk
Get latest updates about Open Source Projects, Conferences and News.