]> asedeno.scripts.mit.edu Git - linux.git/commit
watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend
authorKen Sloat <ksloat@aampglobal.com>
Fri, 14 Jun 2019 12:53:22 +0000 (12:53 +0000)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 8 Jul 2019 18:35:12 +0000 (20:35 +0200)
commit8d209eb0b167ac6998ef330150a3960032a31c50
tree922e45a5f5f7db2f07754d0052b386cdef878e73
parentd0173278935a9c7ea268cc8baa8b669ecb57c0e3
watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend

Currently, the atmel-sama5d4-wdt continues to run after system suspend.
Unless the system resumes within the watchdog timeout period so the
userspace can kick it, the system will be reset. This change disables
the watchdog on suspend if it is active and re-enables on resume. These
actions occur during the late and early phases of suspend and resume
respectively to minimize chances where a lock could occur while the
watchdog is disabled.

Signed-off-by: Ken Sloat <ksloat@aampglobal.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/sama5d4_wdt.c