title: how to register a device driver with android/linux power driver?
body: <p>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. </p>
  
  <p>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..</p>
  
  <p>I have got few links <a href="http://www.kandroid.org/online-pdk/guide/power_management.html" rel="nofollow">http://www.kandroid.org/online-pdk/guide/power_management.html</a>
  and <a href="http://developer.android.com/reference/android/os/PowerManager.html" rel="nofollow">http://developer.android.com/reference/android/os/PowerManager.html</a></p>
  
  <p>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) </p>
  
  <p>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.</p>
  
  <p>Please let me know if I am missing with any details.
  Any help would be highly appreciated.</p>