public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Trying to understand new wakeup events architecture
@ 2010-12-14 17:57 Daniel Drake
  2010-12-15 22:33 ` Rafael J. Wysocki
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Drake @ 2010-12-14 17:57 UTC (permalink / raw)
  To: linux-pm

Hi,

The OLPC XO laptop suspends a lot. It suspends with the screen on as
if it is still running. It can be woken up in a variety of ways:
keyboard, mouse, WLAN, ...

While upstreaming OLPC's power management code I'm facing the
requirement that our userspace power manager needs to know the reason
for system wakeup. For example, if it was a WLAN packet then we can go
back to sleep pretty quickly, without restoring screen brightness (the
screen gets dimmed after a few mins of inactivity on the
keyboard/mouse front). But if the system was woken up with the
keyboard we want to restore screen brightness immediately and stay
awake for a longer time before going back into suspend.

We used to do this (outside of mainline) with a /proc node storing the
"wakeup reason" but I'm now wondering what the most upstream-suitable
approach is.

I saw this patch:

commit 074037ec79bea73edf1b1ec72fef1010e83e3cc5
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Wed Sep 22 22:09:10 2010 +0200

    PM / Wakeup: Introduce wakeup source objects and event statistics

But I'm unable to find any documentation of what it's for or how to use it.

Does it solve my problem?
If so, are there any examples of drivers adapted to use this
functionality? Or documentation?

I suspect the reason I don't understand it well is because I haven't
read 17 long threads about android...And I'd rather not, if it can be
avoided :)

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-01-14  2:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 17:57 Trying to understand new wakeup events architecture Daniel Drake
2010-12-15 22:33 ` Rafael J. Wysocki
2010-12-16 14:39   ` Daniel Drake
2011-01-12 15:01     ` Daniel Drake
2011-01-12 20:02       ` Rafael J. Wysocki
2011-01-13 15:06         ` Daniel Drake
2011-01-13 15:14           ` Alan Stern
2011-01-13 15:56             ` Daniel Drake
2011-01-13 16:55               ` Alan Stern
2011-01-13 19:34                 ` Rafael J. Wysocki
2011-01-13 20:01                   ` Daniel Drake
2011-01-13 20:31                     ` Alan Stern
2011-01-13 20:41                       ` Daniel Drake
2011-01-14  2:11                         ` Paul Fox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox