public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Wakeup settings for USB hubs?
Date: Thu, 5 Jul 2007 17:33:14 +0200	[thread overview]
Message-ID: <200707051733.15353.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0707051054040.3728-100000@iolanthe.rowland.org>

On Thursday, 5 July 2007 17:01, Alan Stern wrote:
> On Thu, 5 Jul 2007, Zhang Rui wrote:
> 
> > IMO, device runtime wakeup and wakeup from a system sleep state are
> > different.
> 
> I sort of agree with you.  (Except that on smaller or embedded systems, 
> there isn't always such a clear distinction between runtime suspend and 
> system suspend.  One sort of blends into the other as more and more 
> components are powered down.  But let's ignore that.)
> 
> > If we want to make use of the wakeup setting in sysfs, we can't simply
> > enable/disable /sys/.../power/wakeup.
> > 
> > Some different values like "device_runtime" and "system_sleep" are
> > needed to indicate the different remote wakeup state.
> > Take ACPI platform for example:
> > "disable":		disable remote wakeup.
> > "device_runtime":	device runtime wakeup is enabled, while device 
> > 			can not wakeup the system from a sleep state.
> > 			For ACPI platforms, that's disable the wakeup
> > 			GPE of the device.
> > "system_sleep":		the ability of wakeup system from a sleep state
> > 			is enabled. It needs to enable the device
> > 			runtime wakeup ability first. and enable wakeup
> > 			GPE as well for ACPI platforms.
> 
> Allow me to rephrase.  You seem to be saying that /sys/.../power/wakeup 
> should be able to hold four different values:
> 
> 	1. always disabled
> 	2. always enabled
> 	3. enabled at runtime but not during system sleep
> 	4. enabled during system sleep but not at runtime
> 
> Right?  With the default being 3 (except for a few things like the 
> power button).
> 
> Or maybe there should be two attribute files: wakeup (used during
> system sleep) and wakeup_runtime (used for runtime suspend).

I like the last idea.

I think that, at least for now, we shouldn't mix the runtime power management
with entering the system sleep states.  Of course on the low level it may be
possible to use the same code for suspending the device regardless of the
purpose, but on the high level mixing the two things often leads to confusion.

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth

  reply	other threads:[~2007-07-05 15:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04 18:43 Wakeup settings for USB hubs? Alan Stern
2007-07-05  7:20 ` Oliver Neukum
2007-07-05 10:28 ` Zhang Rui
2007-07-05 15:01   ` Alan Stern
2007-07-05 15:33     ` Rafael J. Wysocki [this message]
2007-07-05 19:18     ` Oliver Neukum
2007-07-05 19:51       ` Alan Stern
2007-07-05 20:40         ` Oliver Neukum
2007-07-05 21:03           ` Alan Stern
2007-07-05 21:30         ` David Brownell
2007-07-18 10:58           ` Zhang Rui

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=200707051733.15353.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --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