From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Len Brown <len.brown@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-pm@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH 3/8] pm: domains: sync runtime PM status with PM domains
Date: Wed, 18 Feb 2015 10:03:22 +0000 [thread overview]
Message-ID: <20150218100322.GT8656@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1685853.blxysuNkEh@vostro.rjw.lan>
On Wed, Feb 18, 2015 at 08:02:30AM +0100, Rafael J. Wysocki wrote:
> On Tuesday, February 17, 2015 07:42:43 PM Russell King - ARM Linux wrote:
> > It's worse than that. If, in the probe, we decide at a point to query
> > the PM domain status, and transfer it into the RPM status, how does the
> > driver know whether it needs to do a "put" to cause a transition from
> > active to suspended?
>
> When ->probe() runs, the cases are:
> (1) There are no power domains, so the device is "active" when the clock is
> enabled and "suspended" when it is disabled.
> (2) There is a power domain which is initially off. The RPM status of the
> device has to be "suspended" or the domain needs to be powered up.
(quick reply)
That's not entirely correct.
As a result of 2ed127697eb13 (PM / Domains: Power on the PM domain right
after attach completes) the power domain will _always_ be powered on prior
to ->probe() being called, if the device was attached to the PM domain
just before ->probe() is called, inspite of the domain being powered off
before the device was attached to the domain.
If the PM domain is attached earlier, and pm_genpd_poweroff_unused() is
called (before they're attached, but in the kernel boot sequence) the
work for powering down the PM domains will be queued until a point where
it can be scheduled - which will be after devices are attached. That can
allow the PM domain(s) to be powered down (as no driver is attached) which
then results in the driver's ->probe function being called with the PM
domain OFF.
So, right now, there's no way for a driver to know with certainty whether
the device it is about to probe is powered up or powered down.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-02-18 10:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-14 15:26 [FOR DISCUSSION 0/8] Dove PMU support Russell King - ARM Linux
2015-02-14 15:27 ` [PATCH 1/8] pm: domains: quieten down generic pm domains Russell King
2015-02-14 15:27 ` [PATCH 2/8] pm: domains: avoid potential oops in pm_genpd_remove_device() Russell King
2015-02-14 15:27 ` [PATCH 3/8] pm: domains: sync runtime PM status with PM domains Russell King
2015-02-15 4:24 ` Ulf Hansson
2015-02-17 18:53 ` Rafael J. Wysocki
2015-02-17 19:42 ` Alan Stern
2015-02-17 19:42 ` Russell King - ARM Linux
2015-02-18 7:02 ` Rafael J. Wysocki
2015-02-18 10:03 ` Russell King - ARM Linux [this message]
2015-02-18 15:12 ` Alan Stern
2015-02-18 15:42 ` Russell King - ARM Linux
2015-02-18 16:52 ` Rafael J. Wysocki
2015-02-18 17:26 ` Russell King - ARM Linux
2015-02-18 18:05 ` Rafael J. Wysocki
2015-03-04 19:57 ` Ulf Hansson
2015-03-04 20:11 ` Russell King - ARM Linux
2015-02-18 18:42 ` Alan Stern
2015-02-18 16:46 ` Rafael J. Wysocki
2015-02-14 16:49 ` [FOR DISCUSSION 0/8] Dove PMU support Andrew Lunn
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=20150218100322.GT8656@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=andrew@lunn.ch \
--cc=gregkh@linuxfoundation.org \
--cc=jason@lakedaemon.net \
--cc=len.brown@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sebastian.hesselbarth@gmail.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;
as well as URLs for NNTP newsgroup(s).