public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "linux-pm@lists.linux-foundation.org"
	<linux-pm@lists.linux-foundation.org>
Subject: Re: Runtime PM: Calling Device runtime PM callbacks?
Date: Mon, 14 Dec 2009 22:58:26 +0100	[thread overview]
Message-ID: <200912142258.26145.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0912132337470.9109-100000@netrider.rowland.org>

On Monday 14 December 2009, Alan Stern wrote:
> On Mon, 14 Dec 2009, Mahalingam, Nithish wrote:
> 
> > I had one more question -
> > 
> > +The ->runtime_suspend() callback is executed by the PM core for the bus type,
> > +device type and device class of the device being suspended.  The bus type,
> > +device type and device class callbacks are then _entirely_ _responsible_ for
> > +handling the device as appropriate, which may, but need not include executing
> > +the device driver's own ->runtime_suspend() callback (from the PM core's point
> > +of view it is not necessary to implement a ->runtime_suspend() callback in a
> > +device driver as long as the bus type, device type and device class
> > +->runtime_suspend() know what to do to handle the device).
> > 
> > Any specific reason why from PM core we should not call the device driver's 
> > ->runtime_suspend() or ->runtime_resume()? I know one of either the bus/
> > class/type should implement device suspend but what if (worst case) none of 
> > them are doing it? Is it OK in that case (alone) to call device driver's 
> > runtime PM directly (if it is implemented) from the runtime PM core?
> 
> The system PM driver_suspend() and driver_resume() routines don't do 
> that.  For consistency, the runtime PM routines should behave the same 
> way.
> 
> Alan Stern
> 
> P.S.: Rafael, I just realized that your documentation changes could be
> reduced considerably.  All you have to do is explain once how whenever
> a method call occurs, the PM core will search for a callback pointer in
> the following locations: ...  Then in all those places where you list
> all the callback possibilities, just say "the callback routine" or
> something like that.

Yeah.  It was late yesterday when I was preparing the patch and I just didn't
think about that.

Rafael

  reply	other threads:[~2009-12-14 21:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-13  5:20 Runtime PM: Calling Device runtime PM callbacks? Mahalingam, Nithish
2009-12-13 12:34 ` Rafael J. Wysocki
2009-12-13 16:57   ` Alan Stern
2009-12-13 18:36     ` Rafael J. Wysocki
2009-12-13 18:49       ` Alan Stern
2009-12-14  0:03         ` Rafael J. Wysocki
2009-12-14  3:36           ` Mahalingam, Nithish
2009-12-14  4:42             ` Alan Stern
2009-12-14 21:58               ` Rafael J. Wysocki [this message]
2009-12-14  4:37           ` Alan Stern
2009-12-14 21:57             ` Rafael J. Wysocki
2009-12-14 22:08               ` Alan Stern
2009-12-14 22:28                 ` Rafael J. Wysocki
2009-12-14 23:09                   ` Alan Stern
2009-12-14 23:26                     ` Rafael J. Wysocki
2009-12-15  3:11                       ` Mahalingam, Nithish
2009-12-15 14:40                       ` Alan Stern
2009-12-15 20:30                         ` Rafael J. Wysocki
2009-12-15 20:51                           ` Alan Stern
2009-12-15 21:04                             ` Rafael J. Wysocki
2009-12-19 15:13                               ` Rafael J. Wysocki
2009-12-19 16:46                                 ` Alan Stern
2009-12-19 21:31                                   ` 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=200912142258.26145.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --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