From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] PM: add dpm_use_runtime_{suspend, resume} helper functions
Date: Tue, 2 Mar 2010 01:12:02 +0100 [thread overview]
Message-ID: <201003020112.02114.rjw@sisk.pl> (raw)
In-Reply-To: <87r5o3adcw.fsf@deeprootsystems.com>
On Monday 01 March 2010, Kevin Hilman wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
>
> > On Saturday 27 February 2010, Mark Brown wrote:
> >> On Fri, Feb 26, 2010 at 05:06:59PM -0500, Alan Stern wrote:
> >> > On Fri, 26 Feb 2010, Rafael J. Wysocki wrote:
> >>
> >> > > I have one problem with the design. Namely, dpm_invoke_runtime_*() can
> >> > > run a callback from another subsystem. Say you are a device class and you
> >> > > decide to use dpm_invoke_runtime_*(), but the device's bus type implements
> >> > > the runtime PM callbacks, so they will be run as device class suspend and
> >> > > resume callbacks. That doesn't look particularly clean to me.
> >>
> >> > That is a valid point. I suppose there could be separate bus-type,
> >> > device-type, and device-class versions of these functions, but that
> >> > seems like excessive complication with little real benefit.
> >>
> >> I do agree that it'd be good to avoid adding any further complexity here
> >> - the use case I have is devices that only really have one suspend type
> >> and don't want or need to know if it's a runtime, disk or memory suspend.
> >
> > What about the patch below, then (untested)?
> >
> > Use GENERIC_SUBSYS_PM_OPS for the subsystem and then
> > UNIVERSAL_DEV_PM_OPS for drivers, possibly passing NULL as idle_fn.
>
> This looks good to me for what I'm tinkering with too, but have not
> tested it.
>
> One thing missing from the orignal patch is a publicly availble
> version of pm_is_runtime_suspended(). I found this useful in at least
> one driver where I needed a slightly different suspend hook from he
> runtime hook.
It is present, but called pm_runtime_suspended(), in the updated patch I sent
a while ago:
https://lists.linux-foundation.org/pipermail/linux-pm/2010-March/024535.html
I'd appreciate it if someone could test that patch. I only could verify that
it built correctly with various combinations of .config options.
Rafael
next prev parent reply other threads:[~2010-03-02 0:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 16:46 [PATCH] PM: add dpm_use_runtime_{suspend, resume} helper functions Alan Stern
2010-02-26 21:24 ` Rafael J. Wysocki
2010-02-26 22:06 ` Alan Stern
2010-02-27 10:43 ` Mark Brown
2010-02-27 22:50 ` Rafael J. Wysocki
2010-03-01 13:31 ` Mark Brown
2010-03-01 18:40 ` Alan Stern
2010-03-01 22:06 ` Rafael J. Wysocki
2010-03-02 16:12 ` Alan Stern
2010-03-02 22:51 ` Rafael J. Wysocki
2010-03-03 16:46 ` Alan Stern
2010-03-03 21:33 ` Rafael J. Wysocki
2010-03-04 0:56 ` Rafael J. Wysocki
2010-03-01 22:25 ` Kevin Hilman
2010-03-02 0:12 ` Rafael J. Wysocki [this message]
[not found] <201003040156.58763.rjw@sisk.pl>
2010-03-04 3:11 ` Alan Stern
[not found] <Pine.LNX.4.44L0.1003032151581.6963-100000@netrider.rowland.org>
2010-03-04 21:19 ` Rafael J. Wysocki
2010-03-05 14:55 ` Alan Stern
[not found] <Pine.LNX.4.44L0.1003050954160.1677-100000@iolanthe.rowland.org>
2010-03-05 20:40 ` Rafael J. Wysocki
[not found] <201003052140.16948.rjw@sisk.pl>
2010-03-05 21:00 ` Alan Stern
[not found] <Pine.LNX.4.44L0.1003051559410.1384-100000@iolanthe.rowland.org>
2010-03-05 21:09 ` 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=201003020112.02114.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=khilman@deeprootsystems.com \
--cc=linux-pm@lists.linux-foundation.org \
/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