From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: RFC -- updated Documentation/power/devices.txt
Date: Sun, 23 Jul 2006 09:22:29 -0700 [thread overview]
Message-ID: <200607230922.29824.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0607222334510.10239-100000@netrider.rowland.org>
On Saturday 22 July 2006 8:59 pm, Alan Stern wrote:
> On Sat, 22 Jul 2006, David Brownell wrote:
>
> > In short that's kind of a mess. IMO the correct approach involves removing
> > the dev->power.power_state thing entirely, along with the sysfs thing, but
> > we can't do that quite yet.
>
> Then what _can_ we do now? Or better yet, what _should_ we aim towards
> doing? I'm perfectly happy to have those things removed, but what (if
> anything) should take their place?
Remove both, replace with nothing generic ... my $US 0.02. You will
have noticed the patch I sent to add a config option to remove the
/sys/devices/.../power/state files; that can start phasing out soon.
Removing power_state can be done over time.
Some busses could provide bus-specific replacements ... PCI and USB,
not I2C or SPI, as examples. I can't really argue any reason to make
such a replacement though, other than for testing.
> Some simple questions may help start the ball rolling. During a system
> resume, should all devices be powered on full, or should they be restored
> to the state they were in before the suspend?
I'd say the answer is bus- or driver-specific, but lean towards the latter.
Though it's not clear how the PM core could tell about runtime states, since
I also think those should be driver-internal ... so how could anyone tell
the difference?
And for that matter, what is a "system resume" on systems that aren't
as simple as PCs? E.g. when there are multiple run modes, there's
no reason to expect the post-resume mode to be the same as the pre-suspend
one and thus have e.g. the same clocks and voltages available ... neither
"all on full" nor "all on as before suspend" make sense everywhere.
> Or should there be a third
> possibility -- maybe some devices always on, others the way they were?
> And who decides? The driver?
A given system should be able to provide the answer appropriate for
its applications. Example, if it's woken up by a given device, maybe
that's the only non-system device that _needs_ to be activated ...
> For that matter, to what extent does the PM core need to be involved in
> runtime power management?
Hardly at all, in my book. As I wrote in that revised devices.txt...
see that for more info. (That's written to reflect the status quo.)
Different problem domains can have their own hooks ... there's not a
lot of really generic stuff, since the problem domains are so varied.
> As far as I can see, all the core can do is
> provide centralized routines that would be widely useful. But apart from
> something resembling the current sysfs interface, I can't see what those
> routines might do.
See above ... I consider the current /sys/devices/.../power/state interface
irredeemably broken. Which leaves nothing generic enough for the core, at
least in terms of mechanisms needed/used by Linux today.
- Dave
next prev parent reply other threads:[~2006-07-23 16:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:25 RFC -- updated Documentation/power/devices.txt David Brownell
2006-07-11 5:56 ` Andrew Morton
2006-07-11 16:38 ` David Brownell
2006-07-11 21:57 ` David Brownell
2006-07-12 12:25 ` Pavel Machek
2006-07-12 14:04 ` Alan Stern
2006-07-12 15:45 ` David Brownell
2006-07-12 16:03 ` Alan Stern
2006-07-23 1:37 ` David Brownell
2006-07-23 3:59 ` Alan Stern
2006-07-23 10:50 ` Rafael J. Wysocki
2006-07-23 13:03 ` Alan Stern
2006-07-23 22:45 ` Rafael J. Wysocki
2006-07-24 3:22 ` David Brownell
2006-07-24 9:46 ` Rafael J. Wysocki
2006-07-24 14:51 ` Alan Stern
2006-07-24 15:15 ` David Brownell
2006-07-24 15:42 ` Alan Stern
2006-07-24 17:11 ` David Brownell
2006-07-24 20:44 ` Alan Stern
2006-07-24 21:19 ` David Brownell
2006-07-25 15:42 ` Alan Stern
2006-08-10 23:38 ` [patch 2.6.18-rc] " David Brownell
2006-07-23 16:22 ` David Brownell [this message]
2006-07-11 14:40 ` RFC -- " Pavel Machek
2006-07-11 21:28 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2006-07-11 7:56 Woodruff, Richard
2006-07-11 16:51 ` David Brownell
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=200607230922.29824.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-pm@lists.osdl.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