forked from Minki/linux
33b711269a
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>
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
What: /sys/class/watchdog/watchdogn/bootstatus
|
|
Date: August 2015
|
|
Contact: Wim Van Sebroeck <wim@iguana.be>
|
|
Description:
|
|
It is a read only file. It contains status of the watchdog
|
|
device at boot. It is equivalent to WDIOC_GETBOOTSTATUS of
|
|
ioctl interface.
|
|
|
|
What: /sys/class/watchdog/watchdogn/identity
|
|
Date: August 2015
|
|
Contact: Wim Van Sebroeck <wim@iguana.be>
|
|
Description:
|
|
It is a read only file. It contains identity string of
|
|
watchdog device.
|
|
|
|
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'.
|
|
|
|
What: /sys/class/watchdog/watchdogn/state
|
|
Date: August 2015
|
|
Contact: Wim Van Sebroeck <wim@iguana.be>
|
|
Description:
|
|
It is a read only file. It gives active/inactive status of
|
|
watchdog device.
|
|
|
|
What: /sys/class/watchdog/watchdogn/status
|
|
Date: August 2015
|
|
Contact: Wim Van Sebroeck <wim@iguana.be>
|
|
Description:
|
|
It is a read only file. It contains watchdog device's
|
|
internal status bits. It is equivalent to WDIOC_GETSTATUS
|
|
of ioctl interface.
|
|
|
|
What: /sys/class/watchdog/watchdogn/timeleft
|
|
Date: August 2015
|
|
Contact: Wim Van Sebroeck <wim@iguana.be>
|
|
Description:
|
|
It is a read only file. It contains value of time left for
|
|
reset generation. It is equivalent to WDIOC_GETTIMELEFT of
|
|
ioctl interface.
|
|
|
|
What: /sys/class/watchdog/watchdogn/timeout
|
|
Date: August 2015
|
|
Contact: Wim Van Sebroeck <wim@iguana.be>
|
|
Description:
|
|
It is a read only file. It is read to know about current
|
|
value of timeout programmed.
|