mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Shuah Khan <shuah.kh@samsung.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	"pavel@ucw.cz" <pavel@ucw.cz>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: sl811h_suspend() and PM_EVENT_PRETHAW state handling
Date: Wed, 07 Aug 2013 00:38:29 +0200	[thread overview]
Message-ID: <16202005.zAo69g0VlB@vostro.rjw.lan> (raw)
In-Reply-To: <B8EFE96D1287C24090BAD9D858E15E6175A68C@sisaex02sj>

On Tuesday, August 06, 2013 09:38:36 PM Shuah Khan wrote:
> On 08/06/2013 03:22 PM, Alan Stern wrote:
> > On Tue, 6 Aug 2013, Shuah Khan wrote:
> >
> >> With the dev_pm_ops model, drivers have to provide interfaces for each
> >> one of these states.
> >
> > No, they don't.  They can leave out interfaces if they want.
> 
> Yes. Agreed. There is no need to provide each and every interface. Only 
> the ones driver wishes to handle.
> 
> >
> >>   In this case, there will be a conflict since
> >> pm_op() treats this state as freeze where as the driver wants to do
> >> treat it as a suspend/hibernate. In the case of legacy pm_ops, state is
> >> passed in as a parameter and driver could take special action if need
> >> be, based on the state, however in dev_pm_ops model, state is not passed
> >> in. Instead it is handled with state specific pm_ops interfaces.
> >>
> >> For example, if this driver were to be converted to dev_pm_ops, it would
> >> require a freeze interface which will call sl811h_bus_suspend(). Once
> >> that is done, PM_EVENT_PRETHAW will be mapped to freeze() ops and
> >> sl811h_bus_suspend() will be called instead of port_power(sl811, 0);
> >>
> >> What I am getting at is, there is no provision to handle the special
> >> case for PM_EVENT_PRETHAW like in the case of this driver when using
> >> dev_pm_ops.
> >
> > Okay.  So what?
> >
> 
> I am exploring to see if there is a deficiency in dev_pm_ops 
> infrastructure that needs addressing.

No, there isn't.  We determined a few years ago that "freeze" could always be
used instead of "prethaw".  Moreover, there actually is a "thaw" after that
stage if the image restoration fails, so please just use "freeze" here.  Or
just skip it if it is not really needed.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-08-06 22:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 17:14 Shuah Khan
2013-08-06 18:38 ` Alan Stern
2013-08-06 20:37   ` Shuah Khan
2013-08-06 21:21     ` Alan Stern
2013-08-06 21:38       ` Shuah Khan
2013-08-06 22:38         ` Rafael J. Wysocki [this message]
2013-08-06 22:31           ` Shuah Khan

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=16202005.zAo69g0VlB@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=shuah.kh@samsung.com \
    --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

all inboxes | Powered by JetHome®