watchdog: imx2_wdg: suspend watchdog in WAIT mode
authorAndrej Picej <andrej.picej@norik.com>
Fri, 4 Nov 2022 07:03:56 +0000 (08:03 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 18 Feb 2023 14:11:39 +0000 (15:11 +0100)
commite42c73f1ef0da5970a71f98440193fa9b1e9fb86
tree1cecd519166e49187e0b2764d12756ab11c59599
parent7d06c07c67100fd0f8e6b3ab7145ce789f788117
watchdog: imx2_wdg: suspend watchdog in WAIT mode

Putting device into the "Suspend-To-Idle" mode causes watchdog to
trigger and resets the board after set watchdog timeout period elapses.

Introduce new device-tree property "fsl,suspend-in-wait" which suspends
watchdog in WAIT mode. This is done by setting WDW bit in WCR
(Watchdog Control Register). Watchdog operation is restored after
exiting WAIT mode as expected. WAIT mode corresponds with Linux's
"Suspend-To-Idle".

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221104070358.426657-2-andrej.picej@norik.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/imx2_wdt.c