From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>,
linux-omap@vger.kernel.org
Subject: Re: [linux-pm] calling runtime PM from system PM methods
Date: Fri, 10 Jun 2011 16:57:07 +0100 [thread overview]
Message-ID: <20110610155707.GN26436@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106101131110.1921-100000@iolanthe.rowland.org>
On Fri, Jun 10, 2011 at 11:45:30AM -0400, Alan Stern wrote:
> On Fri, 10 Jun 2011, Mark Brown wrote:
> > It's not massively clear to me how much sense that makes for the
> > embedded case where we've got a much better idea of what happened to the
> > hardware over suspend. Note that I'm thinking here mostly of the case
> > where we've runtime suspended the device, if the kernel thought the
> > device was powered then it's much clearer that we should do this on
> > resume.
> Well, this is a SHOULD, not a MUST. If you want your driver to leave a
> device in a low-power state, it can do so. Just bear in mind that the
> PM core's idea of the device's runtime power state may end up not
> matching reality unless you're careful.
This is part of the trouble, it all feels like a lot more work than it
should be for relatively common cases. In the audio case we're fine as
the subsystem implements a completely independent PM infrastructure
which ignores the PM core except for system suspend (and sometimes
ignores that), it's noticably harder to reason about what's going on
when I go outside there and when I think about what I'm doing it always
feels like it should be possible to factor it out of the drivers.
> Of course, even if all devices do get turned on during resume, one
> would expect the normal runtime PM mechanism to power them down again
> very shortly after the resume is finished.
Yeah, though of course if you're only going to be resumed for a very
brief time anyway the amount of time you spend powering up and down
suddenly gets a lot more interesting. Things like responding to a
keepalive from the network can be done quickly enough that people get
annoyed if you burn 10ms or whatever powering up some irrelevant bit of
hardware.
> > I've probably got a fairly
> > odd view of the world here in that I mostly care about big devices
> > connected over slow buses where power up can be user visible, and mostly
> > work on subsystems where the concept of "full power" isn't terribly
> > meaningful.
>
> The PM core tries to be flexible, but there are limitations. In
> particular, it's not very well suited for handling devices with
> multiple power levels. Drivers simply have to do the best they can to
> fit in with the PM core's power model. For example, all functional
> states might be considered "full power" and all others might be
> considered "low power". Coordinating all the extra details would then
> be the driver's responsibility.
Right, I mostly agree - like I say I think the main thing that would be
useful here is to extend the helpers for the common case unified suspend
situation. This may be totally separate to what Kevin needs, though.
next prev parent reply other threads:[~2011-06-10 15:57 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 0:05 calling runtime PM from system PM methods Kevin Hilman
2011-06-02 14:18 ` [linux-pm] " Alan Stern
2011-06-02 17:10 ` Kevin Hilman
2011-06-02 18:38 ` Alan Stern
2011-06-06 18:29 ` Rafael J. Wysocki
2011-06-06 19:16 ` Alan Stern
2011-06-06 22:25 ` Kevin Hilman
2011-06-07 13:55 ` Alan Stern
2011-06-07 21:32 ` Rafael J. Wysocki
2011-06-07 22:34 ` Kevin Hilman
2011-06-08 22:50 ` Kevin Hilman
2011-06-09 5:29 ` Magnus Damm
2011-06-09 13:56 ` Alan Stern
2011-06-10 14:36 ` Mark Brown
2011-06-10 14:51 ` Alan Stern
2011-06-10 15:21 ` Mark Brown
2011-06-10 15:45 ` Alan Stern
2011-06-10 15:57 ` Mark Brown [this message]
2011-06-10 17:17 ` Alan Stern
2011-06-10 17:31 ` Mark Brown
2011-06-10 18:38 ` Rafael J. Wysocki
2011-06-10 18:42 ` Mark Brown
2011-06-10 20:27 ` Rafael J. Wysocki
2011-06-10 21:27 ` Alan Stern
2011-06-11 11:42 ` Mark Brown
2011-06-11 20:56 ` Rafael J. Wysocki
2011-06-13 12:22 ` [linux-pm] " Mark Brown
2011-06-10 18:49 ` Rafael J. Wysocki
2011-06-10 18:54 ` Mark Brown
2011-06-10 20:45 ` Rafael J. Wysocki
2011-06-10 23:52 ` Kevin Hilman
2011-06-11 16:42 ` Alan Stern
2011-06-11 22:46 ` Rafael J. Wysocki
2011-06-12 15:59 ` Alan Stern
2011-06-12 18:27 ` Rafael J. Wysocki
2011-06-15 21:54 ` Kevin Hilman
2011-06-16 0:01 ` Rafael J. Wysocki
2011-06-16 1:17 ` Kevin Hilman
2011-06-16 14:27 ` Alan Stern
2011-06-16 22:48 ` Rafael J. Wysocki
2011-06-17 19:47 ` Rafael J. Wysocki
2011-06-17 20:04 ` Alan Stern
2011-06-17 21:29 ` Rafael J. Wysocki
2011-06-18 11:08 ` Rafael J. Wysocki
2011-06-18 15:31 ` Alan Stern
2011-06-18 21:01 ` Rafael J. Wysocki
2011-06-18 23:57 ` Rafael J. Wysocki
2011-06-19 1:42 ` Alan Stern
2011-06-19 14:04 ` Rafael J. Wysocki
2011-06-19 15:01 ` Alan Stern
2011-06-19 19:36 ` Rafael J. Wysocki
2011-06-20 14:39 ` Alan Stern
2011-06-20 19:53 ` Rafael J. Wysocki
2011-06-16 22:30 ` Rafael J. Wysocki
2011-06-10 23:14 ` Kevin Hilman
2011-06-11 16:27 ` Alan Stern
2011-06-11 23:13 ` Rafael J. Wysocki
2011-06-06 18:01 ` Rafael J. Wysocki
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=20110610155707.GN26436@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-omap@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).