(Re-adding android-ker...@gogolegroups.com to the CC, since others might be interested)

On 04/23/2013 10:50 AM, TheLoneJoker wrote:
But, I am trying to use the pm_wake_lock/unlock API's under
"kernel/power/wakelock.c". I do not see any "public kernel headers", which
I can include in my driver and make calls to "pm_wake_lock/unlock". would
you have any thoughts one this ?

That is because the pm_wake_lock/unlock functions are only for the userland compatibility interface, not the in-kernel driver interfaces.

From a driver, you will want to use the wakeup_source interfaces:
    extern void __pm_stay_awake(struct wakeup_source *ws);
    extern void __pm_relax(struct wakeup_source *ws);
    ...
and others as found in include/linux/pm_wakeup.h.


You can see how the AOSP code is using wakeup_sources to replace wakelocks in their transition header which supports older drivers that still use wakelocks:
https://android.googlesource.com/kernel/common/+/android-3.4/include/linux/wakelock.h


thanks
-john

--
--
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel
--- You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-kernel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to