Perfect. Thanks a lot John..! This will help. Meanwhile I've been reading up the mechanism here:
http://lwn.net/images/pdf/suspend_blockers.pdf Thanks, Vijay On Tue, Apr 23, 2013 at 11:10 AM, John Stultz <[email protected]>wrote: > (Re-adding > android-kernel@gogolegroups.**com<[email protected]>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<https://android.googlesource.com/kernel/common/+/android-3.4/include/linux/wakelock.h> > > > thanks > -john > > -- -- unsubscribe: [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
