<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/power/runtime.c, branch v3.4.45</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/power/runtime.c?h=v3.4.45</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/power/runtime.c?h=v3.4.45'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-02T17:30:22Z</updated>
<entry>
<title>PM / Runtime: Clear power.deferred_resume on success in rpm_suspend()</title>
<updated>2012-10-02T17:30:22Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-08-15T19:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f2e6defbe27240e9d51e4eee2f2568d31956b79'/>
<id>urn:sha1:7f2e6defbe27240e9d51e4eee2f2568d31956b79</id>
<content type='text'>
commit 58a34de7b1a920d287d17d2ca08bc9aaf7e6d35b upstream.

The power.deferred_resume can only be set if the runtime PM status
of device is RPM_SUSPENDING and it should be cleared after its
status has been changed, regardless of whether or not the runtime
suspend has been successful.  However, it only is cleared on
suspend failure, while it may remain set on successful suspend and
is happily leaked to rpm_resume() executed in that case.

That shouldn't happen, so if power.deferred_resume is set in
rpm_suspend() after the status has been changed to RPM_SUSPENDED,
clear it before calling rpm_resume().  Then, it doesn't need to be
cleared before changing the status to RPM_SUSPENDING any more,
because it's always cleared after the status has been changed to
either RPM_SUSPENDED (on success) or RPM_ACTIVE (on failure).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set</title>
<updated>2012-10-02T17:30:22Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-08-15T19:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a0bfb9191135a16c84df7ba580ea839aefff4a0f'/>
<id>urn:sha1:a0bfb9191135a16c84df7ba580ea839aefff4a0f</id>
<content type='text'>
commit 7f321c26c04807834fef4c524d2b21573423fc74 upstream.

For devices whose power.no_callbacks flag is set, rpm_resume()
should return 1 if the device's parent is already active, so that
the callers of pm_runtime_get() don't think that they have to wait
for the device to resume (asynchronously) in that case (the core
won't queue up an asynchronous resume in that case, so there's
nothing to wait for anyway).

Modify the code accordingly (and make sure that an idle notification
will be queued up on success, even if 1 is to be returned).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<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>
</feed>
