mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Eduardo Valentin" <edubezval@gmail.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	"Linux PM list" <linux-pm@vger.kernel.org>,
	"Cao Minh Hiep" <cm-hiep@jinso.co.jp>,
	Dung:人ソ <nv-dung@jinso.co.jp>,
	"Alan Stern" <stern@rowland.harvard.edu>
Subject: Re: [PATCH 2/2] thermal: rcar_thermal: use pm_runtime_put_sync()
Date: Wed, 11 Nov 2015 00:57:13 +0100	[thread overview]
Message-ID: <2060819.A5Wq9BbBOH@vostro.rjw.lan> (raw)
In-Reply-To: <CAPDyKFrDKXRui3onqCp0tH1E4MFN4AchaBrRcfdYi63hNLU63Q@mail.gmail.com>

On Tuesday, November 10, 2015 02:00:38 PM Ulf Hansson wrote:
> +Rafael, Alan
> 
> On 10 November 2015 at 11:10, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Hi Ulf,
> >

[cut]

> >>
> >> The problem is that the runtime PM status of the device isn't
> >> correctly updated at ->remove(). The effect is that the the
> >> pm_runtime_get_sync() in ->probe() at re-bind will *not* trigger the
> >> ->runtime_resume() callbacks to be invoked, as the runtime PM core
> >> believes the device is already runtime resumed.
> >
> > So that's where it should be fixed?
> 
> That would be a more generic approach, although I am not sure how the
> driver/PM core should be able to take the correct decision in this
> phase. Devices may be runtime PM managed also without a driver bound.
> 
> Perhaps when __device_release_driver() finds a bounded driver for the
> device, it could after all actions been performed to unbind the
> driver, check if runtime PM is enabled. If it isn't, it could set the
> runtime PM status to suspended!?
> 
> I have no idea if that would introduce other issues as it would kind
> of force the runtime PM status of the device to suspend, without
> actually knowing if it's the correct thing to do.

IMO, that needs to depend on the bus type.  If the bus type has a way
to manage PM for devices without drivers, it should be allowed to do so.

Of course, the platform bus type is somewhat special in that respect,
but it looks like we simply need some sort of a convention in there too
(the expectations should be the same for everybody).

Thanks,
Rafael


  parent reply	other threads:[~2015-11-10 23:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87h9kulkfg.wl%kuninori.morimoto.gx@renesas.com>
2015-11-10  2:11 ` [PATCH 0/2] thermal: rcar_thermal: tidyup rebind issue Kuninori Morimoto
2015-11-10  2:12   ` [PATCH 1/2] thermal: rcar_thermal: remove redundant operation Kuninori Morimoto
2015-11-13 14:50     ` Ulf Hansson
2015-11-16 18:42     ` Eduardo Valentin
2015-11-10  2:12   ` [PATCH 2/2] thermal: rcar_thermal: use pm_runtime_put_sync() Kuninori Morimoto
2015-11-10  8:18     ` Geert Uytterhoeven
2015-11-10  9:57       ` Ulf Hansson
2015-11-10 10:10         ` Geert Uytterhoeven
2015-11-10 13:00           ` Ulf Hansson
2015-11-10 18:30             ` Eduardo Valentin
2015-11-11  0:11               ` Rafael J. Wysocki
2015-11-10 23:57             ` Rafael J. Wysocki [this message]
2015-11-11 11:03               ` Ulf Hansson
2015-11-12  1:06                 ` Rafael J. Wysocki
2015-11-12  8:04                   ` Ulf Hansson
2015-11-12 18:43                     ` Eduardo Valentin
2015-11-13 15:06                       ` Ulf Hansson
2015-11-11  2:41       ` Kuninori Morimoto
2015-11-10  2:18   ` [PATCH 0/2] thermal: rcar_thermal: tidyup rebind issue Kuninori Morimoto
2015-11-10  2:27     ` Nguyen Viet Dung
2015-11-10  5:15   ` Nguyen Viet Dung
     [not found]     ` <56499E53.2050905@jinso.co.jp>
2015-11-16 21:12       ` PM: after suspend/resume the system,can not suspends again Ulf Hansson
2015-11-17  1:35         ` Cao Minh Hiep

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=2060819.A5Wq9BbBOH@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=cm-hiep@jinso.co.jp \
    --cc=edubezval@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=nv-dung@jinso.co.jp \
    --cc=rui.zhang@intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=ulf.hansson@linaro.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

all inboxes | Powered by JetHome®