I am working on a lcd related kernel level device driver for a android device. Can someone please help me with power management related APIs in Android through which I can register my driver to recieve any changes in device state.
To be more precise I want my driver to recieve any events from power driver(or is there something else) in case when the system state changes, for example from running state to sleep state or suspend state. I would want my driver also to sleep which in current scenario is eating up all the battery..
I have got few links http://www.kandroid.org/online-pdk/guide/power_management.html and http://developer.android.com/reference/android/os/PowerManager.html
which talks about functions like android_register_early_suspend and android_register_early_resume but I could not find any call to these functions in my entire kernel source code (based on linux 3.0)
I have heard of "Linux Power Management" and can find folders like drivers/base/power and drivers/power in my current baseline code. How can I use this driver in my code.
Please let me know if I am missing with any details. Any help would be highly appreciated.