<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/Documentation/power, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/Documentation/power?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/Documentation/power?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-13T14:26:18Z</updated>
<entry>
<title>Documentation: EM: Add artificial EM registration description</title>
<updated>2022-04-13T14:26:18Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2022-03-21T09:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=015f569c4649fe9595ed465dc8e4301d34937f8f'/>
<id>urn:sha1:015f569c4649fe9595ed465dc8e4301d34937f8f</id>
<content type='text'>
Add description about new artificial EM registration and use cases.
Update also the documentation with the new .get_cost() callback
description and usage.

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Reviewed-by: Ionela Voinescu &lt;ionela.voinescu@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: EM: Change the order of arguments in the .active_power() callback</title>
<updated>2022-04-13T14:26:17Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2022-03-21T09:57:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=75a3a99a5a9886af13be44e640cb415ebda80db2'/>
<id>urn:sha1:75a3a99a5a9886af13be44e640cb415ebda80db2</id>
<content type='text'>
The .active_power() callback passes the device pointer when it's called.
Aligned with a convetion present in other subsystems and pass the 'dev'
as a first argument. It looks more cleaner.

Adjust all affected drivers which implement that API callback.

Suggested-by: Ionela Voinescu &lt;ionela.voinescu@arm.com&gt;
Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Reviewed-by: Ionela Voinescu &lt;ionela.voinescu@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Documentation: EM: Describe new registration method using DT</title>
<updated>2022-03-03T04:05:04Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2022-03-02T11:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f48a0c475c2aec8f2274703e1dc7be503f40f7cc'/>
<id>urn:sha1:f48a0c475c2aec8f2274703e1dc7be503f40f7cc</id>
<content type='text'>
The new registration method allows to get power values from the DT OPP
definition. The new OPP entry property "opp-microwatt" contains total
power expressed in micro-Watts. Align the EM documentation with this
new possible registration method of EM.

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-opp', 'pm-devfreq' and 'powercap'</title>
<updated>2022-01-10T17:00:31Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2022-01-10T17:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=78e6e4dfd8f0cbb477a6f9571123edcbd5873c28'/>
<id>urn:sha1:78e6e4dfd8f0cbb477a6f9571123edcbd5873c28</id>
<content type='text'>
Merge an operating performance points (OPP) update, devfreq updates
and power capping updates for 5.17-rc1:

 - Update outdated OPP documentation (Tang Yizhou).

 - Reduce log severity for informative message regarding frequency
   transition failures in devfreq (Tzung-Bi Shih).

 - Add DRAM frequency controller devfreq driver for Allwinner sunXi
   SoCs (Samuel Holland).

 - Add missing COMMON_CLK dependency to the sun8i devfreq driver (Arnd
   Bergmann).

 - Add support for new layout of Psys PowerLimit Register on SPR to
   the Intel RAPL power capping driver (Zhang Rui).

 - Fix typo in a comment in idle_inject.c (Jason Wang).

 - Remove unused function definition from the DTPM (Dynamit Thermal
   Power Management) power capping framework (Daniel Lezcano).

 - Reduce DTPM trace verbosity (Daniel Lezcano).

* pm-opp:
  Documentation: power: Update outdated contents in opp.rst

* pm-devfreq:
  PM / devfreq: Reduce log severity for informative message
  PM / devfreq: sun8i: addd COMMON_CLK dependency
  PM / devfreq: Add a driver for the sun8i/sun50i MBUS

* powercap:
  powercap/drivers/dtpm: Reduce trace verbosity
  powercap/drivers/dtpm: Remove unused function definition
  powercap: fix typo in a comment in idle_inject.c
  powercap: intel_rapl: support new layout of Psys PowerLimit Register on SPR
</content>
</entry>
<entry>
<title>Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm</title>
<updated>2021-12-30T14:53:41Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2021-12-30T14:53:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ffb9bfa8e470fe3035a551f655a6b4c4885bfc2f'/>
<id>urn:sha1:ffb9bfa8e470fe3035a551f655a6b4c4885bfc2f</id>
<content type='text'>
Pull OPP (operating performance points) updates for 5.17-rc1 from Viresh
Kumar:

"This updates the documentation to match the latest code."

* 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  Documentation: power: Update outdated contents in opp.rst
</content>
</entry>
<entry>
<title>Documentation: power: Update outdated contents in opp.rst</title>
<updated>2021-12-27T04:17:52Z</updated>
<author>
<name>Tang Yizhou</name>
<email>tangyizhou@huawei.com</email>
</author>
<published>2021-12-26T08:18:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=489a00ef46c93e85ed540d91836317cc469371ac'/>
<id>urn:sha1:489a00ef46c93e85ed540d91836317cc469371ac</id>
<content type='text'>
Three problems have been revised:
1. CONFIG_PM_OPP no longer depends on CONFIG_PM.
2. opp_find_freq_{ceil, floor} is renamed as dev_pm_opp_find_freq_{ceil,
   floor}.
3. Make it clear that the 'opp' struct is actually dev_pm_opp.

Signed-off-by: Tang Yizhou &lt;tangyizhou@huawei.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM: runtime: Capture device status before disabling runtime PM</title>
<updated>2021-12-17T15:16:40Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2021-12-07T18:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c24efa6732788f0be22cdf5d2aedd5e3117e983f'/>
<id>urn:sha1:c24efa6732788f0be22cdf5d2aedd5e3117e983f</id>
<content type='text'>
In some cases (for example, during system-wide suspend and resume of
devices) it is useful to know whether or not runtime PM has ever been
enabled for a given device and, if so, what the runtime PM status of
it had been right before runtime PM was disabled for it last time.

For this reason, introduce a new struct dev_pm_info field called
last_status that will be used for capturing the runtime PM status of
the device when its power.disable_depth counter changes from 0 to 1.

The new field will be set to RPM_INVALID to start with and whenever
power.disable_depth changes from 1 to 0, so it will be valid only
when runtime PM of the device is currently disabled, but it has been
enabled at least once.

Immediately use power.last_status in rpm_resume() to make it handle
the case when PM runtime is disabled for the device, but its runtime
PM status is RPM_ACTIVE more consistently.  Namely, make it return 1
if power.last_status is also equal to RPM_ACTIVE in that case (the
idea being that if the status was RPM_ACTIVE last time when
power.disable_depth was changing from 0 to 1 and it is still
RPM_ACTIVE, it can be assumed to reflect what happened to the device
last time when it was using runtime PM) and -EACCES otherwise.

Update the documentation to provide a description of last_status and
change the description of pm_runtime_resume() in it to reflect the
new behavior of rpm_active().

While at it, rearrange the code in pm_runtime_enable() to be more
straightforward and replace the WARN() macro in it with a pr_warn()
invocation which is less disruptive.

Link: https://lore.kernel.org/linux-pm/20211026222626.39222-1-ulf.hansson@linaro.org/t/#u
Reviewed-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>Documentation: power: Describe 'advanced' and 'simple' EM models</title>
<updated>2021-11-10T20:26:34Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-11-02T18:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=08374410a5ea3ff2fa9a87edd7d7ab15375b1c31'/>
<id>urn:sha1:08374410a5ea3ff2fa9a87edd7d7ab15375b1c31</id>
<content type='text'>
The Energy Model (EM) can be registered in two ways:

 1) Using a helper function, which under the hood relies on OPP framework
    and DT entry in CPU node: 'dynamic-power-coefficient'. This is
    a 'simple' EM because it's tied to the math formula:
    Power = dynamic-power-coefficient * V^2 * f

 2) Using em_dev_register_perf_domain() API function with a driver
    custom callback which provides power for each performance state.

    This is 'advanced' EM, since it can better reflect real power
    measurements for each performance state. It's not limited to any
    math formula and can better reflect real physics of the device.

Add description of these two methods to the documentation, so developers
could choose the suitable registration method (option).

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Documentation: power: Add description about new callback for EM registration</title>
<updated>2021-11-10T20:26:34Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-11-02T18:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d704aa0d44ade12660d4d7220b2a8d785b7b4247'/>
<id>urn:sha1:d704aa0d44ade12660d4d7220b2a8d785b7b4247</id>
<content type='text'>
The Energy Model (EM) registration for CPUs should now be done using
a dedicated callback added recently into CPUFreq framework and drivers.

Commit c17495b01b72 ("cpufreq: Add callback to register with energy model")

The callback guaranties that the EM registration is called at the right
time during driver setup. To avoid mistakes update the documentation
to align with the existing code implementation.

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Documentation: power: include kernel-doc in Energy Model doc</title>
<updated>2021-09-07T19:17:28Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2021-09-06T08:44:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d62aab8ff711dc3a4c07684ea33042347f79b630'/>
<id>urn:sha1:d62aab8ff711dc3a4c07684ea33042347f79b630</id>
<content type='text'>
Improve the existing documentation of the Energy Model and add kernel-doc
comments. This extends an API description and helps better understanding
the usage.

Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
