<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/power, branch linux-2.6.35.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-09-27T00:18:37+00:00</updated>
<entry>
<title>PM: Prevent waiting forever on asynchronous resume after failing suspend</title>
<updated>2010-09-27T00:18:37+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2010-09-02T23:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2af3495b6359c30740b31175aa818f600f5b8bb9'/>
<id>urn:sha1:2af3495b6359c30740b31175aa818f600f5b8bb9</id>
<content type='text'>
commit 152e1d592071c8b312bb898bc1118b64e4aea535 upstream.

During suspend, the power.completion is expected to be set when a
device has not yet started suspending.  Set it on init to fix a
corner case where a device is resumed when its parent has never
suspended.

Consider three drivers, A, B, and C.  The parent of A is C, and C
has async_suspend set.  On boot, C-&gt;power.completion is initialized
to 0.

During the first suspend:
suspend_devices_and_enter(...)
 dpm_resume(...)
  device_suspend(A)
  device_suspend(B) returns error, aborts suspend
 dpm_resume_end(...)
   dpm_resume(...)
    device_resume(A)
     dpm_wait(A-&gt;parent == C)
      wait_for_completion(C-&gt;power.completion)

The wait_for_completion will never complete, because
complete_all(C-&gt;power.completion) will only be called from
device_suspend(C) or device_resume(C), neither of which is called
if suspend is aborted before C.

After a successful suspend-&gt;resume cycle, where B doesn't abort
suspend, C-&gt;power.completion is left in the completed state by the
call to device_resume(C), and the same call path will work if B
aborts suspend.

Signed-off-by: Colin Cross &lt;ccross@android.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>PM / Runtime: Add sysfs debug files</title>
<updated>2010-05-10T21:08:17+00:00</updated>
<author>
<name>Dominik Brodowski</name>
<email>linux@dominikbrodowski.net</email>
</author>
<published>2010-04-23T18:32:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c92445fadb9179d811b5cb044947ad4712403541'/>
<id>urn:sha1:c92445fadb9179d811b5cb044947ad4712403541</id>
<content type='text'>
Add a few sysfs files relating to runtime power management for
advanced debug purposes:

runtime_enabled: is runtime PM enabled for this device? States
	are "enabled", "disabled", "forbidden" or a combination
	of the latter two.

runtime_status:	what state is the device in currently? E.g., it
	reports "suspended" for runtime-suspended devices, and
        "active" for active devices. NOTE: if runtime_enabled
	returns "disabled", the value of this file may not
	reflect its physical state.

runtime_usage: the runtime PM usage count of a device

runtime_active_kids: the runtime PM children usage count of a device, or
	0 if the ignore_children flag is set.

Also, CONFIG_PM_SLEEP_ADVANCED_DEBUG is not defined in any Kconfig
file, so replace it with CONFIG_PM_ADVANCED_DEBUG.

Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Allow runtime_suspend methods to call pm_schedule_suspend()</title>
<updated>2010-05-10T21:08:16+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-03-22T23:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=240c7337a4cd3d91b196c5ef97ad461b3a22fa09'/>
<id>urn:sha1:240c7337a4cd3d91b196c5ef97ad461b3a22fa09</id>
<content type='text'>
This patch (as1361) changes the runtime PM interface slightly; it
allows suspend requests to be scheduled while the runtime_suspend
method is running.  If the method succeeds then the scheduled request
is cancelled, whereas if the method fails then an idle notification is
sent only if no request was scheduled.

Being able to schedule suspend requests from within a runtime_suspend
method is useful for drivers that need to test for idleness and
suspend the device all while holding a single spinlock, or for drivers
that want to check for idleness by polling.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>power: support _noirq actions on device types and classes</title>
<updated>2010-03-24T10:00:02+00:00</updated>
<author>
<name>Dominik Brodowski</name>
<email>linux@dominikbrodowski.net</email>
</author>
<published>2010-03-15T20:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7176a37d436a214f6a7727ea7986c654cbee8f0'/>
<id>urn:sha1:e7176a37d436a214f6a7727ea7986c654cbee8f0</id>
<content type='text'>
The new-style dev_pm_ops provide callbacks for both IRQs enabled
and disabled. However, the _noirq variants were only called for
buses registered with a device, not for classes and types.

In order to properly use dev_pm_ops in class pcmcia_socket_class,
support _noirq actions also on classes and types.

Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>Driver core: create lock/unlock functions for struct device</title>
<updated>2010-03-08T01:04:52+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2010-02-17T18:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e9394ce2412254ec69fd2a4f3e44a66eade2297'/>
<id>urn:sha1:8e9394ce2412254ec69fd2a4f3e44a66eade2297</id>
<content type='text'>
In the future, we are going to be changing the lock type for struct
device (once we get the lockdep infrastructure properly worked out)  To
make that changeover easier, and to possibly burry the lock in a
different part of struct device, let's create some functions to lock and
unlock a device so that no out-of-core code needs to be changed in the
future.

This patch creates the device_lock/unlock/trylock() functions, and
converts all in-tree users to them.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Ming Lei &lt;tom.leiming@gmail.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Magnus Damm &lt;damm@igel.co.jp&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Cc: Alex Chiang &lt;achiang@hp.com&gt;
Cc: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andrew Patterson &lt;andrew.patterson@hp.com&gt;
Cc: Yu Zhao &lt;yu.zhao@intel.com&gt;
Cc: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Cc: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Cc: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: CHENG Renquan &lt;rqcheng@smu.edu.sg&gt;
Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Frans Pop &lt;elendil@planet.nl&gt;
Cc: David Vrabel &lt;david.vrabel@csr.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>PM: Provide generic subsystem-level callbacks</title>
<updated>2010-03-06T20:28:37+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-03-06T20:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d690b2cd222afc75320b9b8e9da7df02e9e630ca'/>
<id>urn:sha1:d690b2cd222afc75320b9b8e9da7df02e9e630ca</id>
<content type='text'>
There are subsystems whose power management callbacks only need to
invoke the callbacks provided by device drivers.  Still, their system
sleep PM callbacks should play well with the runtime PM callbacks,
so that devices suspended at run time can be left in that state for
a system sleep transition.

Provide a set of generic PM callbacks for such subsystems and
define convenience macros for populating dev_pm_ops structures.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Allow device drivers to use dpm_wait()</title>
<updated>2010-02-26T19:39:11+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-01-27T22:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8824cee405c62ba465b85365201166d9cf86a14'/>
<id>urn:sha1:f8824cee405c62ba465b85365201166d9cf86a14</id>
<content type='text'>
There are some dependencies between devices (in particular, between
EHCI USB controllers and their OHCI/UHCI siblings) which are not
reflected by the structure of the device tree.  With synchronous
suspend and resume these dependencies are taken into accout
automatically, because the devices in question are always registered
in the right order, but to meet these constraints with asynchronous
suspend and resume the drivers of these devices will need to use
dpm_wait() in their suspend/resume routines, so introduce a helper
function allowing them to do that.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Start asynchronous resume threads upfront</title>
<updated>2010-02-26T19:39:11+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-01-23T21:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97df8c12995c5bac73e3bfeea4c5be155c1f4401'/>
<id>urn:sha1:97df8c12995c5bac73e3bfeea4c5be155c1f4401</id>
<content type='text'>
It has been shown by testing that total device resume time can be
reduced significantly (by as much as 50% or more) if the async
threads executing some devices' resume routines are all started
before the main resume thread starts to handle the "synchronous"
devices.

This is a consequence of the fact that the slowest devices tend to be
located at the end of dpm_list, so their resume routines are started
very late.  Consequently, they have to wait for all the preceding
"synchronous" devices before their resume routines can be started
by the main resume thread, even if they are "asynchronous".  By
starting their async threads upfront we effectively move those
devices towards the beginning of dpm_list, without breaking their
ordering with respect to their parents and children.  As a result,
their resume routines are started much earlier and we are able to
save much more device resume time this way.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Add facility for advanced testing of async suspend/resume</title>
<updated>2010-02-26T19:39:10+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-01-23T21:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a2eb8585f3b38e01e30aacaa8b985a1520a993d'/>
<id>urn:sha1:5a2eb8585f3b38e01e30aacaa8b985a1520a993d</id>
<content type='text'>
Add configuration switch CONFIG_PM_ADVANCED_DEBUG for compiling in
extra PM debugging/testing code allowing one to access some
PM-related attributes of devices from the user space via sysfs.

If CONFIG_PM_ADVANCED_DEBUG is set, add sysfs attribute power/async
for every device allowing the user space to access the device's
power.async_suspend flag and modify it, if desired.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Add a switch for disabling/enabling asynchronous suspend/resume</title>
<updated>2010-02-26T19:39:10+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-01-23T21:25:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e06b4a891c6a108412fe24b4500f499da2cf8a1'/>
<id>urn:sha1:0e06b4a891c6a108412fe24b4500f499da2cf8a1</id>
<content type='text'>
Add sysfs attribute /sys/power/pm_async allowing the user space to
disable/enable asynchronous suspend/resume of devices.

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