All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pm@vger.kernel.org, Len Brown <len.brown@intel.com>,
	Pavel Machek <pavel@ucw.cz>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	Russell King <rmk+kernel@arm.linux.org.uk>
Subject: Re: [PATCH V2] PM / Domains: Sync runtime PM status with genpd after probe
Date: Fri, 20 Mar 2015 17:14:34 -0700	[thread overview]
Message-ID: <7hvbhvi4ut.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1426863312-31132-1-git-send-email-ulf.hansson@linaro.org> (Ulf Hansson's message of "Fri, 20 Mar 2015 15:55:12 +0100")

Ulf Hansson <ulf.hansson@linaro.org> writes:

> From: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Buses which currently supports attaching devices to their PM domains,
> will invoke the dev_pm_domain_attach() API from their ->probe()
> callbacks. During the attach procedure, genpd power up the PM domain.
>
> In those scenarios where the bus/driver don't need to access its device
> during probe, it may leave it in runtime PM suspended state since
> that's also the default state. In that way, no notifications through
> the runtime PM callbacks will reach the PM domain during probe.
>
> For genpd, the consequence from the above scenario means the PM domain
> will remain powered. Therefore, implement the struct dev_pm_domain's
> ->sync() callback, which is invoked from driver core after the
> bus/driver has probed the device. It allows genpd to power off the PM
> domain if it's unused.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> [Ulf: Updated patch according to updates in driver core]
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v2:
> 	- I picked up Russell's earlier patch [1] and updated it to fit the
> 	changes [2] proposed to be done to the driver core.
>
> 	[1]: [PATCH 3/9] pm: domains: sync runtime PM status with PM domains
> 	after probe
>
> 	[2]: [PATCH v3] driver core / PM: Add PM domain callbacks for device
> 	setup/cleanup
> 	http://www.spinics.net/lists/arm-kernel/msg407394.html

Ah, I hadn't seen this when I reviewed Rafael's v3 and suggested
Russell's patch be reworked.  This is just what I had in mind.

Acked-by: Kevin Hilman <khilman@linaro.org>

WARNING: multiple messages have this Message-ID (diff)
From: khilman@kernel.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2] PM / Domains: Sync runtime PM status with genpd after probe
Date: Fri, 20 Mar 2015 17:14:34 -0700	[thread overview]
Message-ID: <7hvbhvi4ut.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1426863312-31132-1-git-send-email-ulf.hansson@linaro.org> (Ulf Hansson's message of "Fri, 20 Mar 2015 15:55:12 +0100")

Ulf Hansson <ulf.hansson@linaro.org> writes:

> From: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Buses which currently supports attaching devices to their PM domains,
> will invoke the dev_pm_domain_attach() API from their ->probe()
> callbacks. During the attach procedure, genpd power up the PM domain.
>
> In those scenarios where the bus/driver don't need to access its device
> during probe, it may leave it in runtime PM suspended state since
> that's also the default state. In that way, no notifications through
> the runtime PM callbacks will reach the PM domain during probe.
>
> For genpd, the consequence from the above scenario means the PM domain
> will remain powered. Therefore, implement the struct dev_pm_domain's
> ->sync() callback, which is invoked from driver core after the
> bus/driver has probed the device. It allows genpd to power off the PM
> domain if it's unused.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> [Ulf: Updated patch according to updates in driver core]
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v2:
> 	- I picked up Russell's earlier patch [1] and updated it to fit the
> 	changes [2] proposed to be done to the driver core.
>
> 	[1]: [PATCH 3/9] pm: domains: sync runtime PM status with PM domains
> 	after probe
>
> 	[2]: [PATCH v3] driver core / PM: Add PM domain callbacks for device
> 	setup/cleanup
> 	http://www.spinics.net/lists/arm-kernel/msg407394.html

Ah, I hadn't seen this when I reviewed Rafael's v3 and suggested
Russell's patch be reworked.  This is just what I had in mind.

Acked-by: Kevin Hilman <khilman@linaro.org>

  reply	other threads:[~2015-03-21  0:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 14:55 [PATCH V2] PM / Domains: Sync runtime PM status with genpd after probe Ulf Hansson
2015-03-20 14:55 ` Ulf Hansson
2015-03-21  0:14 ` Kevin Hilman [this message]
2015-03-21  0:14   ` Kevin Hilman

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=7hvbhvi4ut.fsf@deeprootsystems.com \
    --to=khilman@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=len.brown@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=rmk+kernel@arm.linux.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.