[linux-pm] What woke system up?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Dec 2005, Todd Poynor wrote:

> Next in our series of wakeup patches: a consumer electronics maker asked
> for a userspace interface to inquire what woke the system up, in order
> to present different behaviors depending on the wakeup source.  This is
> to be encouraged, as it places these kinds of policy decisions into the
> power policy application and out of the kernel.
>
> So here's a quick try at adding a /sys/power/waker attribute and a
> pm_add_waker() kernel function that either drivers or board PM code can
> use to add (so far format-free) strings useful for telling what woke the
> system up.  The idea is that a buffer of these strings is cleared at
> each suspend and added to by the platform's resume path and/or driver
> resume methods.
>
> I'll send a patch or two for embedded boards showing how
> this could be used for SoC-specific wakeup sources.
>
> Any interest in this or something like it for Linux in general, or any
> other suggestions?  Thanks -- Todd

What about stashing a pointer to the device that did the wakeup, then
using a symlink to point to the sysfs directory of that device? That way,
instead of some arbitrary string, like "wake wake wake", you can
definitively know what device it was, as well as any other status..

You can remove the symlink on suspend, just like you could clear the
string, and re-add it on resume.

Thanks,


	Patrick


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux