<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/power, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-11-11T00:29:09Z</updated>
<entry>
<title>PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails</title>
<updated>2016-11-11T00:29:09Z</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2016-11-10T01:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f75c3fd56daf547d684127a7f83c283c3c160d1'/>
<id>urn:sha1:6f75c3fd56daf547d684127a7f83c283c3c160d1</id>
<content type='text'>
Consider two devices, A and B, where B is a child of A, and B utilizes
asynchronous suspend (it does not matter whether A is sync or async). If
B fails to suspend_noirq() or suspend_late(), or is interrupted by a
wakeup (pm_wakeup_pending()), then it aborts and sets the async_error
variable. However, device A does not (immediately) check the async_error
variable; it may continue to run its own suspend_noirq()/suspend_late()
callback. This is bad.

We can resolve this problem by doing our error and wakeup checking
(particularly, for the async_error flag) after waiting for children to
suspend, instead of before. This also helps align the logic for the noirq and
late suspend cases with the logic in __device_suspend().

It's easy to observe this erroneous behavior by, for example, forcing a
device to sleep a bit in its suspend_noirq() (to ensure the parent is
waiting for the child to complete), then return an error, and watch the
parent suspend_noirq() still get called. (Or similarly, fake a wakeup
event at the right (or is it wrong?) time.)

Fixes: de377b397272 (PM / sleep: Asynchronous threads for suspend_late)
Fixes: 28b6fd6e3779 (PM / sleep: Asynchronous threads for suspend_noirq)
Reported-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-cpuidle', 'pm-opp' and 'pm-avs'</title>
<updated>2016-10-01T23:43:16Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-10-01T23:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e35db92b4f53cad816af25c1a5f8be414e0de9fc'/>
<id>urn:sha1:e35db92b4f53cad816af25c1a5f8be414e0de9fc</id>
<content type='text'>
* pm-cpuidle:
  ARM: cpuidle: Fix error return code

* pm-opp:
  PM / OPP: Don't support OPP if it provides supported-hw but platform does not
  PM / OPP: avoid maybe-uninitialized warning

* pm-avs:
  PM / AVS: SmartReflex: Neaten logging
</content>
</entry>
<entry>
<title>Merge branch 'pm-domains'</title>
<updated>2016-10-01T23:41:29Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-10-01T23:41:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2dc3c72cd0a3ea85b8b7ae469904cfc24af1de60'/>
<id>urn:sha1:2dc3c72cd0a3ea85b8b7ae469904cfc24af1de60</id>
<content type='text'>
* pm-domains:
  PM / Domains: Rename pm_genpd_sync_poweron|poweroff()
  PM / Domains: Don't measure latency of -&gt;power_on|off() during system PM
  PM / Domains: Remove redundant system PM callbacks
  PM / Domains: Simplify detaching a device from its genpd
  PM / Domains: Allow holes in genpd_data.domains array
  PM / Domains: Add support for removing nested PM domains by provider
  PM / Domains: Add support for removing PM domains
  PM / Domains: Store the provider in the PM domain structure
  PM / Domains: Prepare for adding support to remove PM domains
  PM / Domains: Verify the PM domain is present when adding a provider
  PM / Domains: Don't expose xlate and provider helper functions
  PM / Domains: Don't expose generic_pm_domain structure to clients
  staging: board: Remove calls to of_genpd_get_from_provider()
  ARM: EXYNOS: Remove calls to of_genpd_get_from_provider()
  PM / Domains: Add new helper functions for device-tree
  PM / Domains: Always enable debugfs support if available
</content>
</entry>
<entry>
<title>PM / OPP: Don't support OPP if it provides supported-hw but platform does not</title>
<updated>2016-09-26T13:13:31Z</updated>
<author>
<name>Dave Gerlach</name>
<email>d-gerlach@ti.com</email>
</author>
<published>2016-09-23T20:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4ee4545932d4b26ec0c190f2ce265de79990c7a'/>
<id>urn:sha1:a4ee4545932d4b26ec0c190f2ce265de79990c7a</id>
<content type='text'>
The OPP framework allows each OPP to set a opp-supported-hw property
which provides values that are matched against supported_hw values
provided by the platform to limit support for certain OPPs on specific
hardware. Currently, if the platform does not set supported_hw values,
all OPPs are interpreted as supported, even if they have provided their
own opp-supported-hw values.

If an OPP has provided opp-supported-hw, it is indicating that there is
some specific hardware configuration it is supported by. These constraints
should be honored, and if no supported_hw has been provided by the
platform, there is no way to determine if that OPP is actually supported,
so it should be marked as not supported.

Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Rename pm_genpd_sync_poweron|poweroff()</title>
<updated>2016-09-23T23:54:29Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-09-21T13:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eefdee07074db61764408583a23e96cf60d5a0a7'/>
<id>urn:sha1:eefdee07074db61764408583a23e96cf60d5a0a7</id>
<content type='text'>
These are internal static functions to genpd. Let's conform to the naming
rules, by dropping the "pm_" prefix from these.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Don't measure latency of -&gt;power_on|off() during system PM</title>
<updated>2016-09-23T23:54:29Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-09-21T13:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=adb560b3ee395ac9688a93582d805edec4c3d3e7'/>
<id>urn:sha1:adb560b3ee395ac9688a93582d805edec4c3d3e7</id>
<content type='text'>
Measure latency does by itself contribute to an increased latency, thus we
should avoid it when it isn't needed.

Currently genpd measures latencies in the system PM phase for the
-&gt;power_on|off() callbacks, except in the syscore case when it's not
allowed to use ktime_get() as timekeeping may be suspended.

Since there should be plenty of occasions during runtime PM to perform
these measurements, let's rely on that and drop them from system PM. This
will also make it consistent for how measurements are done of the runtime
PM callbacks (as those may be invoked during system PM).

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Remove redundant system PM callbacks</title>
<updated>2016-09-23T23:54:28Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-09-21T13:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=294f47ffd55c3710c6f8ca1122e0424f045a099c'/>
<id>urn:sha1:294f47ffd55c3710c6f8ca1122e0424f045a099c</id>
<content type='text'>
In cases when the PM domain haven't assigned a system PM callback, the PM
core fall-backs to check for the callback at the driver level instead.
This makes it redundant to assign a pm_generic_* helper function to a
corresponding system PM callback at a PM domain level.

Therefore, let's remove these assignments in pm_genpd_init().

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Simplify detaching a device from its genpd</title>
<updated>2016-09-23T23:54:28Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-09-21T13:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=85168d56cc8603963cfdda1e2b9e8f9b68aef867'/>
<id>urn:sha1:85168d56cc8603963cfdda1e2b9e8f9b68aef867</id>
<content type='text'>
There's no need to validate the PM domain by using genpd_lookup_dev() when
removing the device via genpd's genpd_dev_pm_detach() function. That's
because this function can't be called, unless there is a valid PM domain
for the device.

To simplify the behaviour, let's move code from pm_genpd_remove_device()
into a new internal function, genpd_remove_device(), which is called from
pm_genpd_remove_device() and genpd_dev_pm_detach().

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Lina Iyer &lt;lina.iyer@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: avoid maybe-uninitialized warning</title>
<updated>2016-09-16T22:58:00Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-09-15T15:38:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4df27c91893fd13eaa30e9b0bca74f317816f428'/>
<id>urn:sha1:4df27c91893fd13eaa30e9b0bca74f317816f428</id>
<content type='text'>
When CONFIG_OPTIMIZE_INLINING is set and we are building with -Wmaybe-uninitialized
enabled, we can get a warning for the opp core driver:

drivers/base/power/opp/core.c: In function 'dev_pm_opp_set_rate':
drivers/base/power/opp/core.c:560:8: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized]

This has only now appeared as a result of commit 797da5598f3a ("PM / devfreq:
Add COMPILE_TEST for build coverage"), which makes the driver visible in
some configurations that didn't have it before.

The warning is a false positive that I got with gcc-6.1.1, but there is
a simple workaround in removing the local variables that we get warnings
for (all three are affected depending on the configuration). This also
makes the code easier to read.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Allow holes in genpd_data.domains array</title>
<updated>2016-09-16T22:56:34Z</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2016-09-15T12:05:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=609bed67bd8f72981faba75d80b3b48d746b7206'/>
<id>urn:sha1:609bed67bd8f72981faba75d80b3b48d746b7206</id>
<content type='text'>
In platforms such as Rockchip's, the array of domains isn't always
filled without holes, as which domains are present depend on the
particular SoC revision.

By allowing holes to be in the array, such SoCs can still use a single
set of constants to index the array of power domains.

Fixes: 0159ec670763 (PM / Domains: Verify the PM domain is present when adding a provider)
Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Acked-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
