watchdog: add nowayout helpers to Watchdog Timer Driver Kernel API

Add two nowayout helpers for the Watchdog Timer Driver Kernel API.
And apply this to the already converted drivers.
Note: s3c2410_wdt lost the nowayout feature during the conversion.

Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
Wim Van Sebroeck
2011-11-29 16:24:16 +01:00
parent b8ec61189f
commit ff0b3cd4a4
4 changed files with 28 additions and 9 deletions
@@ -1,6 +1,6 @@
The Linux WatchDog Timer Driver Core kernel API.
===============================================
Last reviewed: 22-Jul-2011
Last reviewed: 29-Nov-2011
Wim Van Sebroeck <wim@iguana.be>
@@ -142,6 +142,14 @@ bit-operations. The status bits that are defined are:
* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog.
If this bit is set then the watchdog timer will not be able to stop.
To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
timer device) you can either:
* set it statically in your watchdog_device struct with
.status = WATCHDOG_NOWAYOUT_INIT_STATUS,
(this will set the value the same as CONFIG_WATCHDOG_NOWAYOUT) or
* use the following helper function:
static inline void watchdog_set_nowayout(struct watchdog_device *wdd, int nowayout)
Note: The WatchDog Timer Driver Core supports the magic close feature and
the nowayout feature. To use the magic close feature you must set the
WDIOF_MAGICCLOSE bit in the options field of the watchdog's info structure.