public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@sirena.org.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] PM: add dpm_use_runtime_{suspend, resume} helper functions
Date: Sat, 27 Feb 2010 10:43:09 +0000	[thread overview]
Message-ID: <20100227104309.GB2994@sirena.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1002261702070.2029-100000@iolanthe.rowland.org>

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.

> Mark and Kevin, do you have any thoughts on this?

It seems to me that since people have to explicitly choose to invoke
this behaviour any such cross calls shouldn't be an issue.  There's a
reasonable chance that class or bus callbacks are just straightforward
pass throughs which don't actually add anything except moving the
function from dev_pm_ops into the bus or class ops and changing the
parameter to a more specific structure type.  Having to decide which
version of the functions to use wouldn't add anything for them.

  reply	other threads:[~2010-02-27 10:43 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 [this message]
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
     [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=20100227104309.GB2994@sirena.org.uk \
    --to=broonie@sirena.org.uk \
    --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