summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/Kconfig
diff options
context:
space:
mode:
authorPratyush Anand2015-12-17 13:23:59 +0100
committerWim Van Sebroeck2015-12-27 16:55:57 +0100
commit33b711269ade3f6bc9d9d15e4343e6fa922d999b (patch)
tree24858dcb710a0dbcd3c992e136c5dc3ca8a5e744 /drivers/watchdog/Kconfig
parentwatchdog: Use static struct class watchdog_class in stead of pointer (diff)
downloadkernel-qcow2-linux-33b711269ade3f6bc9d9d15e4343e6fa922d999b.tar.gz
kernel-qcow2-linux-33b711269ade3f6bc9d9d15e4343e6fa922d999b.tar.xz
kernel-qcow2-linux-33b711269ade3f6bc9d9d15e4343e6fa922d999b.zip
watchdog: Read device status through sysfs attributes
This patch adds following attributes to watchdog device's sysfs interface to read its different status. * state - reads whether device is active or not * identity - reads Watchdog device's identity string. * timeout - reads current timeout. * timeleft - reads timeleft before watchdog generates a reset * bootstatus - reads status of the watchdog device at boot * status - reads watchdog device's internal status bits * nowayout - reads whether nowayout feature was set or not Testing with iTCO_wdt: # cd /sys/class/watchdog/watchdog1/ # ls bootstatus dev device identity nowayout power state subsystem timeleft timeout uevent # cat identity iTCO_wdt # cat timeout 30 # cat state inactive # echo > /dev/watchdog1 # cat timeleft 26 # cat state active # cat bootstatus 0 # cat nowayout 0 Signed-off-by: Pratyush Anand <panand@redhat.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/Kconfig')
-rw-r--r--drivers/watchdog/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 1c427beffadd..71e47dde7d4a 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -46,6 +46,13 @@ config WATCHDOG_NOWAYOUT
get killed. If you say Y here, the watchdog cannot be stopped once
it has been started.
+config WATCHDOG_SYSFS
+ bool "Read different watchdog information through sysfs"
+ default n
+ help
+ Say Y here if you want to enable watchdog device status read through
+ sysfs attributes.
+
#
# General Watchdog drivers
#