diff options
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r-- | Documentation/watchdog/watchdog-kernel-api.txt | 22 |
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 | ||
145 | Not all watchdog timer hardware supports the same functionality. That's why | 145 | Not all watchdog timer hardware supports the same functionality. That's why |
146 | all other routines/operations are optional. They only need to be provided if | 146 | all 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. | |||
189 | The status bits should (preferably) be set with the set_bit and clear_bit alike | 189 | The status bits should (preferably) be set with the set_bit and clear_bit alike |
190 | bit-operations. The status bits that are defined are: | 190 | bit-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: |