From: Derek N. <der...@gm...> - 2010-09-16 21:46:51
|
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 using? 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. http://old.nabble.com/GPIO-IRQs-in-kernel-for-Overo-td21890338.html Thanks for your help, Derek |
From: Cliff B. <cli...@gm...> - 2010-09-16 23:15:39
|
On Thu, Sep 16, 2010 at 5:46 PM, Derek Nielson <der...@gm...> 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 > using? 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, "MY_IRQ_NAME", <data>) Cliff -- ================= http://bec-systems.com |
From: Søren S. C. <li...@ss...> - 2010-10-03 11:31:12
|
> 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)... Best regards Søren --- SSC Solutions ApS - Denmark - www.ssc-solutions.dk |