public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@laptop.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Trying to understand new wakeup events architecture
Date: Thu, 13 Jan 2011 15:56:26 +0000	[thread overview]
Message-ID: <1294934186.2244.38.camel@polyethylene> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1101131012090.2022-100000@iolanthe.rowland.org>

On Thu, 2011-01-13 at 10:14 -0500, Alan Stern wrote:
> On Thu, 13 Jan 2011, Daniel Drake wrote:
> 
> > As for contents, it will read back a string. One of:
> > 
> > rtc alarm
> > power button
> > lid
> > key press
> > battery
> > battery state changed
> > battery error
> > ebook
> > wlan packet
> > ac power
> > battery critical
> > gp timer
> > hda
> > usb
> > unknown
> 
> Wouldn't it be better to read back a device pathname when the wakeup
> source can be identified as a particular device?  Whoever uses this 
> field should be responsible for converting it to one of those more 
> generic forms.

It could be done, but might be ugly. The problem is that those
individual devices don't really know that they were woken up. It's done
by OLPC's EC driver. So the EC driver would have to either hardcode
device paths, or have a load of device-hunting code.

Another small problem is that it doesn't encode the difference between
"battery state changed" and "battery error", for example.

If it's really disliked as a string, perhaps it would be OK just to
stash it within the sysfs directory of our device, not polluting the
global namespace.

I'm hoping this can all be a temporary measure anyway, as future closer
integration with Rafael's wakeup events architecture plus the ability
for that architecture to export wakeup source info should make it go
away.

Daniel

  reply	other threads:[~2011-01-13 15:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294934186.2244.38.camel@polyethylene \
    --to=dsd@laptop.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox