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@lists.linux-foundation.org
Subject: Re: runtime PM: common hooks for static and runtime PM
Date: Sat, 6 Feb 2010 15:46:33 +0000	[thread overview]
Message-ID: <20100206154632.GA3664@sirena.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1002052148340.6076-100000@netrider.rowland.org>

On Fri, Feb 05, 2010 at 09:57:46PM -0500, Alan Stern wrote:
> On Fri, 5 Feb 2010, Mark Brown wrote:

> > It's not that it's hard per se, it's that it feels like it's peering
> > inside the implementation of the API.  Having the PM core provide

> You mean like providing an is_runtime_suspended() test?  Then you could 
> write:

> 	int my_suspend(struct device *dev)
> 	{
> 		if (is_runtime_suspended(dev))
> 			return 0;
> 		return my_runtime_suspend(dev);
> 	}

> Or maybe you'd prefer to see a convenient pm_use_runtime_suspend() 
> function that you could use for your dev_pm_ops.suspend pointer, which 
> would do essentially the same as the above?  (Along with a 
> corresponding pm_use_runtime_resume() function, of course.)

Either (or both, of course - implementing the second would probably
imply the former).  The ops that can be assigned would be the clearest
option but the accessor function should be enough to make it clear that
this is something drivers are supposed to be doing.

  reply	other threads:[~2010-02-06 15:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 23:30 runtime PM: common hooks for static and runtime PM Kevin Hilman
2010-02-04 15:24 ` Alan Stern
2010-02-05 10:43   ` Mark Brown
2010-02-05 15:41     ` Alan Stern
2010-02-05 16:11       ` Mark Brown
2010-02-05 21:40         ` Alan Stern
2010-02-05 22:44           ` Mark Brown
2010-02-06  2:57             ` Alan Stern
2010-02-06 15:46               ` Mark Brown [this message]
2010-02-06 16:18                 ` Alan Stern
2010-02-08 14:54                   ` Alan Stern
2010-02-24 18:14                     ` Mark Brown
2010-02-24 18:56                       ` Alan Stern
2010-02-24 22:32                         ` Mark Brown
2010-02-25 15:26                         ` Kevin Hilman
2010-03-16 21:31   ` Kevin Hilman
2010-03-17 14:47     ` Alan Stern
2010-03-17 16:42       ` Kevin Hilman
2010-03-17 17:10         ` Alan Stern
2010-03-17 21:46           ` Rafael J. Wysocki
2010-03-17 22:32             ` Kevin Hilman
2010-03-18 14:13               ` Alan Stern

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=20100206154632.GA3664@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