drivers: power: Add watchdog timer to catch drivers which lockup during suspend.
authorBenoit Goby <benoit@android.com>
Thu, 13 Aug 2009 16:40:42 +0000 (09:40 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:34 +0000 (13:53 -0800)
commitad86cc8ad63229eeeba0628e99f2f59df55a25fd
tree1ace17fffeb7b323e543f12f2255938e8cdb8664
parentb6779572759b9d41b1b559825d3f2cbe9c8c0c50
drivers: power: Add watchdog timer to catch drivers which lockup during suspend.

Rather than hard-lock the kernel, dump the suspend thread stack and
BUG() when a driver takes too long to suspend.  The timeout is set
to 12 seconds to be longer than the usbhid 10 second timeout.

Exclude from the watchdog the time spent waiting for children that
are resumed asynchronously and time every device, whether or not they
resumed synchronously.

Change-Id: Ifd211c06b104860c2fee6eecfe0d61774aa4508a
Original-author: San Mehat <san@google.com>
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/base/power/main.c