Matt Matt

Wake from GPIO interrupt

Discussion created by Matt Matt on Aug 2, 2012
Latest reply on Apr 30, 2014 by victorien

I am trying to use the standby / Wait For Interrupt mode on the i.MX28, but I am having problems waking from this state by using a standard GPIO.


First, I did it the ugly way by editing arch/arm/mach-mx28/pm.c to manually enable the interrupt I wanted (as in, direct write to the register rather than request the interrupt the Lunux way).  This allowed me to exit the WFI mode, but once the board resumed, my driver that used that GPIO pin no longer worked.


Then I found the "enable_irq_wake(irq_num)" function call, and I used that in my driver.  But for some reason my board will not wake when I toggle the GPIO (I removed the custom hack described in the previous paragraph).  I am confident that I am using the correct irq number because it is the same number I used when I did the "request_irq()" call which worked fine.


Am I missing something?  It seems like this should be pretty straight forward, but I can't seem to find a good example.



- Matt