From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.osdl.org
Subject: Re: RFC -- updated Documentation/power/devices.txt
Date: Mon, 24 Jul 2006 10:11:14 -0700 [thread overview]
Message-ID: <200607241011.15325.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0607241128460.6638-100000@iolanthe.rowland.org>
On Monday 24 July 2006 8:42 am, Alan Stern wrote:
>
> What I wrote wasn't necessarily intended to be different from what the
> methods mean today. But it _is_ different from what people tend to think.
>
> It's very natural for someone to imagine that suspend() means "Suspend
> your device" (i.e., put it in a low-power state) and resume() means
> "Resume your device" (i.e., change it to full-power). But the real
> emphasis is different; people need to know that suspend() actually means
> "The _system_ is going to suspend" and resume() means "The _system_ is
> resuming".
Good point. I'll tweak the text to make that more explicit. We're in
agreement it seems, and that was already written up ... but not in what
I suspect is the best place for such points.
> > > These meanings may not be entirely consistent with the way the PM core
> > > works now,
> >
> > I don't believe any semantic change is being discussed here.
>
> There is. Right now suspend_device() won't call the bus's suspend method
> if dev->power.power_state.event is non-zero. But since the purpose of the
> call is to inform the driver that the _system_ is going to suspend, the
> call should be made regardless of the _device's_ state (which the core
> shouldn't be concerned with anyway).
OK, _now_ we're discussing a semantic change. ;)
I've added dev->power.power_state to the "this is deprecated" text, along
with the sysfs power/state file. IMO we can't realistically make that change
(removing the "is it nonzero" test) so long as the sysfs mechanism exists.
> > Considering how few drivers use dev->power.power_state, it's easier to
> > say the problem is in the ones that use it ... rather than the ones that
> > ignore it and act as I've described above! :)
>
> I don't know to what extent there are problems in the drivers. Not much,
> hopefully. The real problem lies in the core.
Yes the core has the problem, but drivers referencing power_state is the
workaround for that problem.
Once the sysfs mechanism goes away, there won't be much need for the mechanism.
Only callers to dpm_runtime_*() would trigger any of the troublesome paths.
The two callers are USB and PCMCIA, and I'm not sure they really need the extra
lock that's grabbed by the dpm_runtime_*() calls if there's no need to protect
against that sysfs mechanism.
- Dave
next prev parent reply other threads:[~2006-07-24 17:11 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 [this message]
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 ` RFC -- " David Brownell
2006-07-11 14:40 ` 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=200607241011.15325.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