I am currently working on porting Android 4.4 (Kitkat) on an embedded system (Freescale i.MX6 based). In order to start my development, I used a few development kits (Wandboard, Boundary Device's BD-SL).
While working on the power management of my custom board, I had no trouble to put the devkits in suspend. However, I couldn't find how to wake them from sleep (other than power cycling them). The expected way of waking the system would be by getting an interrupt on a GPIO (e.g. the on-off button on an Android based phone).
I wanted to know what was the usual way to wake up an android device from suspend with a GPIO's interrupt. Though the question may seem trivial, I had trouble gathering all the information I needed from various searches on Google and specialized forums. I found a lot of information but nothing that covered the whole subject. Probably because I was missing the required background, I had trouble putting everything together without a code example. I guessed I was not the only one in this situation, thus this post.
Here are some of the information I found: