On 05/09/2013 08:04 AM, Vasanth Raja Chittampally wrote:
The auto sleep feature is now in mainline but a very few drivers have been modified (wake up sources and events) to use auto sleep feature.
True, though the alarmdev and eventpoll are probably two of the most common users, there are a number of edge cases in drivers that need wakeup_source enablement. Most of those edge case changes are currently out-of-tree in AOSP, using simple shim header that converts older in-kernel wakelock usage to wakeup_sources.
I saw a commit
commit a180c0d659f604568637336a00c0c3ca2f7b094a Author: John Stultz john.stultz@linaro.org Date: Tue Apr 24 10:57:16 2012 -0700
staging: android-alarm: Switch from wakelocks to wakeup sources In their current AOSP tree, the Android in-kernel wakelock infrastructure has been reimplemented in terms of wakeup sources:
http://git.linaro.org/gitweb?p=people/jstultz/android.git%3Ba=commitdiff%3Bh...
The Android alarm driver currently has stubbed out calls to wakelock functionality. So this patch simply converts the stubbed out wakelock calls to wakeup source calls, and removes the empty wakelock macros
Is auto sleep feature currently being tested or are there any plans to move all the drivers to use both the wakelock mechanism and autosleep?
So the autosleep feature is already in-use on shipping devices with Android 4.2.
And only drivers that trigger wakeup events (rather then all drivers) need the wakeup_source enablement. I'm hoping now that the needed infrastructure is upstream, driver maintainers will consider adding and merging the support.
If you're interested in adding support for particular driver, let me know, since we could use more help here.
thanks -john