<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/power/runtime.c, branch v3.4-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/power/runtime.c?h=v3.4-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/power/runtime.c?h=v3.4-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-03-26T20:46:52Z</updated>
<entry>
<title>PM / Runtime: don't forget to wake up waitqueue on failure</title>
<updated>2012-03-26T20:46:52Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-03-26T20:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f2791d733a2f06997b573d1a3cfde21e6f529826'/>
<id>urn:sha1:f2791d733a2f06997b573d1a3cfde21e6f529826</id>
<content type='text'>
This patch (as1535) fixes a bug in the runtime PM core.  When a
runtime suspend attempt completes, whether successfully or not, the
device's power.wait_queue is supposed to be signalled.  But this
doesn't happen in the failure pathway of rpm_suspend() when another
autosuspend attempt is rescheduled.  As a result, a task can get stuck
indefinitely on the wait queue (I have seen this happen in testing).

The patch fixes the problem by moving the wake_up_all() call up near
the start of the failure code.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pm-runtime' into pm-for-linus</title>
<updated>2011-12-25T22:43:05Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-12-25T22:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0015afaa1f818d38ea9f8e81a84a6aeeca5fdaf0'/>
<id>urn:sha1:0015afaa1f818d38ea9f8e81a84a6aeeca5fdaf0</id>
<content type='text'>
* pm-runtime:
  PM / Runtime: Use device PM QoS constraints (v2)
</content>
</entry>
<entry>
<title>PM: Run the driver callback directly if the subsystem one is not there</title>
<updated>2011-12-21T21:01:05Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-12-17T23:34:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=35cd133c6130c1eb52806808abee9d62e6854a27'/>
<id>urn:sha1:35cd133c6130c1eb52806808abee9d62e6854a27</id>
<content type='text'>
Make the PM core execute driver PM callbacks directly if the
corresponding subsystem callbacks are not present.

There are three reasons for doing that.  First, it reflects the
behavior of drivers/base/dd.c:really_probe() that runs the driver's
.probe() callback directly if the bus type's one is not defined, so
this change will remove one arbitrary difference between the PM core
and the remaining parts of the driver core.  Second, it will allow
some subsystems, whose PM callbacks don't do anything except for
executing driver callbacks, to be simplified quite a bit by removing
those "forward-only" callbacks.  Finally, it will allow us to remove
one level of indirection in the system suspend and resume code paths
where it is not necessary, which is going to lead to less debug noise
with initcall_debug passed in the kernel command line (messages won't
be printed for driverless devices whose subsystems don't provide
PM callbacks among other things).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Runtime: Use device PM QoS constraints (v2)</title>
<updated>2011-12-01T20:46:42Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-11-30T23:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00dc9ad18d707f36b2fb4af98fd2cf0548d2b258'/>
<id>urn:sha1:00dc9ad18d707f36b2fb4af98fd2cf0548d2b258</id>
<content type='text'>
Make the runtime PM core use device PM QoS constraints to check if
it is allowed to suspend a given device, so that an error code is
returned if the device's own PM QoS constraint is negative or one of
its children has already been suspended for too long.  If this is
not the case, the maximum estimated time the device is allowed to be
suspended, computed as the minimum of the device's PM QoS constraint
and the PM QoS constraints of its children (reduced by the difference
between the current time and their suspend times) is stored in a new
device's PM field power.max_time_suspended_ns that can be used by
the device's subsystem or PM domain to decide whether or not to put
the device into lower-power (and presumably higher-latency) states
later (if the constraint is 0, which means "no constraint", the
power.max_time_suspended_ns is set to -1).

Additionally, the time of execution of the subsystem-level
.runtime_suspend() callback for the device is recorded in the new
power.suspend_time field for later use by the device's subsystem or
PM domain along with power.max_time_suspended_ns (it also is used
by the core code when the device's parent is suspended).

Introduce a new helper function,
pm_runtime_update_max_time_suspended(), allowing subsystems and PM
domains (or device drivers) to update the power.max_time_suspended_ns
field, for example after changing the power state of a suspended
device.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2011-11-07T03:44:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-07T03:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32aaeffbd4a7457bf2f7448b33b5946ff2a960eb'/>
<id>urn:sha1:32aaeffbd4a7457bf2f7448b33b5946ff2a960eb</id>
<content type='text'>
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include &lt;linux/module.h&gt;
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include &lt;linux/module.h&gt;
  net: sch_generic remove redundant use of &lt;linux/module.h&gt;
  net: inet_timewait_sock doesnt need &lt;linux/module.h&gt;
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
</content>
</entry>
<entry>
<title>PM / Runtime: Automatically retry failed autosuspends</title>
<updated>2011-11-04T21:28:14Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-11-03T22:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=886486b792e4f6f96d4fbe8ec5bf20811cab7d6a'/>
<id>urn:sha1:886486b792e4f6f96d4fbe8ec5bf20811cab7d6a</id>
<content type='text'>
Originally, the runtime PM core would send an idle notification
whenever a suspend attempt failed.  The idle callback routine could
then schedule a delayed suspend for some time later.

However this behavior was changed by commit
f71648d73c1650b8b4aceb3856bebbde6daa3b86 (PM / Runtime: Remove idle
notification after failing suspend).  No notifications were sent, and
there was no clear mechanism to retry failed suspends.

This caused problems for the usbhid driver, because it fails
autosuspend attempts as long as a key is being held down.  Therefore
this patch (as1492) adds a mechanism for retrying failed
autosuspends.  If the callback routine updates the last_busy field so
that the next autosuspend expiration time is in the future, the
autosuspend will automatically be rescheduled.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Runtime: Fix runtime accounting calculation error</title>
<updated>2011-11-04T21:28:10Z</updated>
<author>
<name>venu byravarasu</name>
<email>vbyravarasu@nvidia.com</email>
</author>
<published>2011-11-03T09:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=def0c0a37d02820497fcd5a74b6cc93dbce5dc06'/>
<id>urn:sha1:def0c0a37d02820497fcd5a74b6cc93dbce5dc06</id>
<content type='text'>
With delta type being int, its value is made zero
for all values of now &gt; 0x80000000.
Hence fixing it.

Signed-off-by: venu byravarasu &lt;vbyravarasu@nvidia.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required.</title>
<updated>2011-10-31T23:31:38Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T11:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b6bc32f0a7380102499deb6aa99a59e789efb33'/>
<id>urn:sha1:1b6bc32f0a7380102499deb6aa99a59e789efb33</id>
<content type='text'>
Most of these files were implicitly getting EXPORT_SYMBOL via
device.h which was including module.h, but that path will be broken
soon.

[ with input from Stephen Rothwell &lt;sfr@canb.auug.org.au&gt; ]

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>PM / Runtime: Handle .runtime_suspend() failure correctly</title>
<updated>2011-10-16T21:25:23Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2011-10-12T20:59:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=857b36c7b038ac56a882ee914df93e5985443074'/>
<id>urn:sha1:857b36c7b038ac56a882ee914df93e5985443074</id>
<content type='text'>
If .runtime_suspend() returns -EAGAIN or -EBUSY, the device should
still be in ACTIVE state, so it is not necessary to send an idle
notification to its parent.  If .runtime_suspend() returns other
fatal failure, it doesn't make sense to send idle notification to
its parent.

Skip parent idle notification when failure is returned from
.runtime_suspend() and update comments in rpm_suspend() to reflect
that change.

[rjw: Modified the subject and changelog slightly.]

Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Runtime: Fix kerneldoc comment for rpm_suspend()</title>
<updated>2011-10-16T21:25:08Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2011-10-12T03:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=47d8f0bac0fda4c15a030f92cd6da6c6bed87459'/>
<id>urn:sha1:47d8f0bac0fda4c15a030f92cd6da6c6bed87459</id>
<content type='text'>
This patch fix kerneldoc comments for rpm_suspend():

 - 'Cancel a pending idle notification' should be put before, also
   should be changed to 'Cancel a pending idle notification,
   autosuspend or suspend'.

 - idle notification for the device after succeeding suspend has
   been removed, so update the comment accordingly.

[rjw: Modified the subject and changelog slightly.]

Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
</feed>
