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)
committerColin Cross <ccross@android.com>
Tue, 14 Feb 2012 19:25:28 +0000 (11:25 -0800)
commit5ded4f63f7f6c47f3b689138b8a9807fc50c34ff
tree5b1cbc4be0f535a36610738b37e6bc413892381b
parent5b45cdd3fc03b4f950454fa967b2c187b75db6cb
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