diff options
author | Guenter Roeck <linux@roeck-us.net> | 2016-07-18 01:04:11 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2016-07-19 11:09:07 +0300 |
commit | 90b826f17a4e1c4ff2b3ef69512a6409e94f4d64 (patch) | |
tree | 8eb26b2dd367a2d7ec258ebadbbd989cfab8245c /Documentation/watchdog/watchdog-kernel-api.txt | |
parent | c7ef68c32265a396a4d977f896a11a4cebb0ace4 (diff) | |
download | linux-90b826f17a4e1c4ff2b3ef69512a6409e94f4d64.tar.xz |
watchdog: Implement status function in watchdog core
Up to now, the watchdog status function called a driver function,
which was supposed to return the watchdog status. All but one
driver using the watchdog core did not implement this function,
and the driver implementing it did not implement it correctly
(the function is supposed to return WDIOF_ flags). At the same time,
at least some of the status information can be provided by the watchdog
core.
Provide the available status bits directly from the watchdog driver core.
Call the driver status function if it exists to get the boot status, but
always provide WDIOF_MAGICCLOSE and WDIOF_KEEPALIVEPING internally.
This patch makes the 'status' sysfs attribute always available.
This attribute is now displayed as hex number with 0x prepended to be
easier to decode.
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.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt index 92700d229bf9..7f31125c123e 100644 --- a/Documentation/watchdog/watchdog-kernel-api.txt +++ b/Documentation/watchdog/watchdog-kernel-api.txt @@ -167,6 +167,10 @@ they are supported. These optional routines/operations are: info structure). * status: this routine checks the status of the watchdog timer device. The status of the device is reported with watchdog WDIOF_* status flags/bits. + WDIOF_MAGICCLOSE and WDIOF_KEEPALIVEPING are reported by the watchdog core; + it is not necessary to report those bits from the driver. Also, if no status + function is provided by the driver, the watchdog core reports the status bits + provided in the bootstatus variable of struct watchdog_device. * set_timeout: this routine checks and changes the timeout of the watchdog timer device. It returns 0 on success, -EINVAL for "parameter out of range" and -EIO for "could not write value to the watchdog". On success this |