<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/power/sysfs.c, 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>2015-07-28T07:50:41Z</updated>
<entry>
<title>PM / QoS: Make it possible to expose device latency tolerance to userspace</title>
<updated>2015-07-28T07:50:41Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-07-27T15:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13b2c4a0c3b1cd37ee6bcfbb5b6e2b94e9a75364'/>
<id>urn:sha1:13b2c4a0c3b1cd37ee6bcfbb5b6e2b94e9a75364</id>
<content type='text'>
Typically when a device is created the bus core it belongs to (for example
PCI) does not know if the device supports things like latency tolerance.
This is left to the driver that binds to the device in question. However,
at that time the device has already been created and there is no way to set
its dev-&gt;power.set_latency_tolerance anymore.

So follow what has been done for other PM QoS attributes as well and allow
drivers to expose and hide latency tolerance from userspace, if the device
supports it.

Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM: Drop CONFIG_PM_RUNTIME from the driver core</title>
<updated>2014-12-03T23:46:58Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-11-27T21:38:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d30d819dc83107812d9b2876e5e7194e511ed6af'/>
<id>urn:sha1:d30d819dc83107812d9b2876e5e7194e511ed6af</id>
<content type='text'>
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so quite a few
depend on CONFIG_PM or even may be dropped entirely in some cases.

Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PM core code.

Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / sysfs: avoid shadowing variables</title>
<updated>2014-09-08T13:40:18Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-09-08T06:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b4f43131da08881423213dace0a514f325fe134'/>
<id>urn:sha1:2b4f43131da08881423213dace0a514f325fe134</id>
<content type='text'>
The global variable "enabled" is shadowed in a number of
functions in this file, rename it to "_enabled" to avoid
that. For consistency, also rename "disabled" and move
them both into the #ifdef where they're needed.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Introcuce latency tolerance device PM QoS type</title>
<updated>2014-02-10T23:35:38Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-02-10T23:35:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d984ad132a87ca2112f81f21039493176a8bca0'/>
<id>urn:sha1:2d984ad132a87ca2112f81f21039493176a8bca0</id>
<content type='text'>
Add a new latency tolerance device PM QoS type to be use for
specifying active state (RPM_ACTIVE) memory access (DMA) latency
tolerance requirements for devices.  It may be used to prevent
hardware from choosing overly aggressive energy-saving operation
modes (causing too much latency to appear) for the whole platform.

This feature reqiures hardware support, so it only will be
available for devices having a new .set_latency_tolerance()
callback in struct dev_pm_info populated, in which case the
routine pointed to by it should implement whatever is necessary
to transfer the effective requirement value to the hardware.

Whenever the effective latency tolerance changes for the device,
its .set_latency_tolerance() callback will be executed and the
effective value will be passed to it.  If that value is negative,
which means that the list of latency tolerance requirements for
the device is empty, the callback is expected to switch the
underlying hardware latency tolerance control mechanism to an
autonomous mode if available.  If that value is PM_QOS_LATENCY_ANY,
in turn, and the hardware supports a special "no requirement"
setting, the callback is expected to use it.  That allows software
to prevent the hardware from automatically updating the device's
latency tolerance in response to its power state changes (e.g. during
transitions from D3cold to D0), which generally may be done in the
autonomous latency tolerance control mode.

If .set_latency_tolerance() is present for the device, a new
pm_qos_latency_tolerance_us attribute will be present in the
devivce's power directory in sysfs.  Then, user space can use
that attribute to specify its latency tolerance requirement for
the device, if any.  Writing "any" to it means "no requirement, but
do not let the hardware control latency tolerance" and writing
"auto" to it allows the hardware to be switched to the autonomous
mode if there are no other requirements from the kernel side in the
device's list.

This changeset includes a fix from Mika Westerberg.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Rename device resume latency QoS items</title>
<updated>2014-02-10T23:35:23Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-02-10T23:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b02f6695f7601c4f8442b9cf4636802e7fa8d550'/>
<id>urn:sha1:b02f6695f7601c4f8442b9cf4636802e7fa8d550</id>
<content type='text'>
Rename symbols, variables, functions and structure fields related do
the resume latency device PM QoS type so that it is clear where they
belong (in particular, to avoid confusion with the latency tolerance
device PM QoS type introduced by a subsequent changeset).

Update the PM QoS documentation to better reflect its current state.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>driver core: replace strict_strto*() with kstrto*()</title>
<updated>2013-07-27T01:02:43Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-26T04:10:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34da5e6770ac06df770a0355b417155e6e84e263'/>
<id>urn:sha1:34da5e6770ac06df770a0355b417155e6e84e263</id>
<content type='text'>
The usage of strict_strto*() is not preferred, because
strict_strto*() is obsolete. Thus, kstrto*() should be
used.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Remove device PM QoS sysfs attributes at the right place</title>
<updated>2013-03-04T13:23:12Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-03-04T13:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37530f2bda039774bd65aea14cc1d1dd26a82b9e'/>
<id>urn:sha1:37530f2bda039774bd65aea14cc1d1dd26a82b9e</id>
<content type='text'>
Device PM QoS sysfs attributes, if present during device removal,
are removed from within device_pm_remove(), which is too late,
since dpm_sysfs_remove() has already removed the whole attribute
group they belonged to.  However, moving the removal of those
attributes to dpm_sysfs_remove() alone is not sufficient, because
in theory they still can be re-added right after being removed by it
(the device's driver is still bound to it at that point).

For this reason, move the entire desctruction of device PM QoS
constraints to dpm_sysfs_remove() and make it prevent any new
constraints from being added after it has run.  Also, move the
initialization of the power.qos field in struct device to
device_pm_init_common() and drop the no longer needed
dev_pm_qos_constraints_init().

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Make it possible to expose PM QoS device flags to user space</title>
<updated>2012-10-24T00:08:18Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2012-10-24T00:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e39473d0b9448e770f49b0b15e514be884264438'/>
<id>urn:sha1:e39473d0b9448e770f49b0b15e514be884264438</id>
<content type='text'>
Define two device PM QoS flags, PM_QOS_FLAG_NO_POWER_OFF
and PM_QOS_FLAG_REMOTE_WAKEUP, and introduce routines
dev_pm_qos_expose_flags() and dev_pm_qos_hide_flags() allowing the
caller to expose those two flags to user space or to hide them
from it, respectively.

After the flags have been exposed, user space will see two
additional sysfs attributes, pm_qos_no_power_off and
pm_qos_remote_wakeup, under the device's /sys/devices/.../power/
directory.  Then, writing 1 to one of them will update the
PM QoS flags request owned by user space so that the corresponding
flag is requested to be set.  In turn, writing 0 to one of them
will cause the corresponding flag in the user space's request to
be cleared (however, the owners of the other PM QoS flags requests
for the same device may still request the flag to be set and it
may be effectively set even if user space doesn't request that).

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Acked-by: mark gross &lt;markgross@thegnar.org&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Prepare struct dev_pm_qos_request for more request types</title>
<updated>2012-10-22T23:09:00Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2012-10-22T23:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=021c870ba4ab4bc9a23d5db4e324f50f26d8ab24'/>
<id>urn:sha1:021c870ba4ab4bc9a23d5db4e324f50f26d8ab24</id>
<content type='text'>
The subsequent patches will use struct dev_pm_qos_request for
representing both latency requests and flags requests.  To make that
easier, put the node member of struct dev_pm_qos_request (under the
name "pnode") into a union called "data" that will represent the
request's  value and list node depending on its type.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: mark gross &lt;markgross@thegnar.org&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset</title>
<updated>2012-07-12T20:40:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-07-11T20:42:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d181b49eb3d76ed6a134cb599456176f466047c0'/>
<id>urn:sha1:d181b49eb3d76ed6a134cb599456176f466047c0</id>
<content type='text'>
The power/async device sysfs attribute is only used if both
CONFIG_PM_ADVANCED_DEBUG and CONFIG_PM_SLEEP are set, but the code
implementing it doesn't depend on CONFIG_PM_SLEEP.  As a result, a
build warning appears if CONFIG_PM_ADVANCED_DEBUG is set and
CONFIG_PM_SLEEP is not set.

Fix it by adding a #ifdef CONFIG_PM_SLEEP around the code in
question.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
</feed>
