]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Runtime: Automatically retry failed autosuspends
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 3 Nov 2011 22:39:18 +0000 (23:39 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 4 Nov 2011 21:28:14 +0000 (22:28 +0100)
commit4d23b2cf4231b1e260cd7c3b19de12869c2d3893
tree1c638e14492c16f8f69ca71fa93b2d81d8e4eeb6
parentb2c32cb2db9f73cb92e79ff3c9b022cc9519aaec
PM / Runtime: Automatically retry failed autosuspends

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
05189183fa319d1461bd0acc4c725288014d5509 (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 <stern@rowland.harvard.edu>
Tested-by: Henrik Rydberg <rydberg@euromail.se>
Cc: <stable@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Documentation/power/runtime_pm.txt
drivers/base/power/runtime.c