summaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog/watchdog-kernel-api.txt
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-02-28 16:12:16 -0500
committerWim Van Sebroeck <wim@iguana.be>2016-03-16 16:11:15 -0400
commitee142889e32f564f9b5e57b68b06693ec5473074 (patch)
tree69afe4a8324087bbd96636048f9b306d5a84eb28 /Documentation/watchdog/watchdog-kernel-api.txt
parent664a39236e718f9f03fa73fc01006da9ced04efc (diff)
watchdog: Introduce WDOG_HW_RUNNING flag
The WDOG_HW_RUNNING flag is expected to be set by watchdog drivers if the hardware watchdog is running. If the flag is set, the watchdog subsystem will ping the watchdog even if the watchdog device is closed. The watchdog driver stop function is now optional and may be omitted if the watchdog can not be stopped. If stopping the watchdog is not possible but the driver implements a stop function, it is responsible to set the WDOG_HW_RUNNING flag in its stop function. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'Documentation/watchdog/watchdog-kernel-api.txt')
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt22
1 files changed, 15 insertions, 7 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 15a02595ade1..954134a5c4a4 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -137,10 +137,10 @@ are:
137* stop: with this routine the watchdog timer device is being stopped. 137* stop: with this routine the watchdog timer device is being stopped.
138 The routine needs a pointer to the watchdog timer device structure as a 138 The routine needs a pointer to the watchdog timer device structure as a
139 parameter. It returns zero on success or a negative errno code for failure. 139 parameter. It returns zero on success or a negative errno code for failure.
140 Some watchdog timer hardware can only be started and not be stopped. The 140 Some watchdog timer hardware can only be started and not be stopped.
141 driver supporting this hardware needs to make sure that a start and stop 141 If a watchdog can not be stopped, the watchdog driver must set the
142 routine is being provided. This can be done by using a timer in the driver 142 WDOG_HW_RUNNING flag in its stop function to inform the watchdog core that
143 that regularly sends a keepalive ping to the watchdog timer hardware. 143 the watchdog is still running.
144 144
145Not all watchdog timer hardware supports the same functionality. That's why 145Not all watchdog timer hardware supports the same functionality. That's why
146all other routines/operations are optional. They only need to be provided if 146all other routines/operations are optional. They only need to be provided if
@@ -189,11 +189,19 @@ The 'ref' and 'unref' operations are no longer used and deprecated.
189The status bits should (preferably) be set with the set_bit and clear_bit alike 189The status bits should (preferably) be set with the set_bit and clear_bit alike
190bit-operations. The status bits that are defined are: 190bit-operations. The status bits that are defined are:
191* WDOG_ACTIVE: this status bit indicates whether or not a watchdog timer device 191* WDOG_ACTIVE: this status bit indicates whether or not a watchdog timer device
192 is active or not. When the watchdog is active after booting, then you should 192 is active or not from user perspective. User space is expected to send
193 set this status bit (Note: when you register the watchdog timer device with 193 heartbeat requests to the driver while this flag is set.
194 this bit set, then opening /dev/watchdog will skip the start operation)
195* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog. 194* WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog.
196 If this bit is set then the watchdog timer will not be able to stop. 195 If this bit is set then the watchdog timer will not be able to stop.
196* WDOG_HW_RUNNING: Set by the watchdog driver if the hardware watchdog is
197 running. The bit must be set if the watchdog timer hardware can not be
198 stopped. The bit may also be set if the watchdog timer is running after
199 booting, before the watchdog device is opened. If set, the watchdog
200 infrastructure will send keepalives to the watchdog hardware while
201 WDOG_ACTIVE is not set.
202 Note: when you register the watchdog timer device with this bit set,
203 then opening /dev/watchdog will skip the start operation but send a keepalive
204 request instead.
197 205
198 To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog 206 To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
199 timer device) you can either: 207 timer device) you can either: