Skip to content
Commit 886486b7 authored by Alan Stern's avatar Alan Stern Committed by Rafael J. Wysocki
Browse files

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
f71648d7 (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: default avatarAlan Stern <stern@rowland.harvard.edu>
Tested-by: default avatarHenrik Rydberg <rydberg@euromail.se>
Cc: <stable@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 6513fd69
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment