summaryrefslogtreecommitdiff
path: root/Documentation/ABI/testing/sysfs-class-watchdog
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2019-11-05 23:51:18 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2019-11-18 21:53:43 +0300
commitbc44fa734cef28e7ddb26bbf9e75e7f7449c9db2 (patch)
treee7c5aaf051523dfd27b25f47c377b6cc8093ff72 /Documentation/ABI/testing/sysfs-class-watchdog
parenta19f89335f4bda3d77d991c96583e3e51856acbb (diff)
downloadlinux-bc44fa734cef28e7ddb26bbf9e75e7f7449c9db2.tar.xz
watchdog: make nowayout sysfs file writable
It can be useful to delay setting the nowayout feature for a watchdog device. Moreover, not every driver (notably gpio_wdt) implements a nowayout module parameter/otherwise respects CONFIG_WATCHDOG_NOWAYOUT, and modifying those drivers carries a risk of causing a regression for someone who has two watchdog devices, sets CONFIG_WATCHDOG_NOWAYOUT and somehow relies on the gpio_wdt driver being ignorant of that (i.e., allowing one to gracefully close a gpio_wdt but not the other watchdog in the system). So instead, simply make the nowayout sysfs file writable. Obviously, setting nowayout is a one-way street. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20191105205118.11359-1-linux@rasmusvillemoes.dk Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'Documentation/ABI/testing/sysfs-class-watchdog')
-rw-r--r--Documentation/ABI/testing/sysfs-class-watchdog9
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-watchdog b/Documentation/ABI/testing/sysfs-class-watchdog
index 675f9b537661..9860a8b2ba75 100644
--- a/Documentation/ABI/testing/sysfs-class-watchdog
+++ b/Documentation/ABI/testing/sysfs-class-watchdog
@@ -17,8 +17,13 @@ What: /sys/class/watchdog/watchdogn/nowayout
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
- It is a read only file. While reading, it gives '1' if that
- device supports nowayout feature else, it gives '0'.
+ It is a read/write file. While reading, it gives '1'
+ if the device has the nowayout feature set, otherwise
+ it gives '0'. Writing a '1' to the file enables the
+ nowayout feature. Once set, the nowayout feature
+ cannot be disabled, so writing a '0' either has no
+ effect (if the feature was already disabled) or
+ results in a permission error.
What: /sys/class/watchdog/watchdogn/state
Date: August 2015