aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog/watchdog-kernel-api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/watchdog/watchdog-kernel-api.txt')
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 9e162465b0cf..227f6cd0e5fa 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
1The Linux WatchDog Timer Driver Core kernel API. 1The Linux WatchDog Timer Driver Core kernel API.
2=============================================== 2===============================================
3Last reviewed: 29-Nov-2011 3Last reviewed: 16-Mar-2012
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -77,6 +77,7 @@ struct watchdog_ops {
77 int (*ping)(struct watchdog_device *); 77 int (*ping)(struct watchdog_device *);
78 unsigned int (*status)(struct watchdog_device *); 78 unsigned int (*status)(struct watchdog_device *);
79 int (*set_timeout)(struct watchdog_device *, unsigned int); 79 int (*set_timeout)(struct watchdog_device *, unsigned int);
80 unsigned int (*get_timeleft)(struct watchdog_device *);
80 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); 81 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
81}; 82};
82 83
@@ -117,11 +118,13 @@ they are supported. These optional routines/operations are:
117 status of the device is reported with watchdog WDIOF_* status flags/bits. 118 status of the device is reported with watchdog WDIOF_* status flags/bits.
118* set_timeout: this routine checks and changes the timeout of the watchdog 119* set_timeout: this routine checks and changes the timeout of the watchdog
119 timer device. It returns 0 on success, -EINVAL for "parameter out of range" 120 timer device. It returns 0 on success, -EINVAL for "parameter out of range"
120 and -EIO for "could not write value to the watchdog". On success the timeout 121 and -EIO for "could not write value to the watchdog". On success this
121 value of the watchdog_device will be changed to the value that was just used 122 routine should set the timeout value of the watchdog_device to the
122 to re-program the watchdog timer device. 123 achieved timeout value (which may be different from the requested one
124 because the watchdog does not necessarily has a 1 second resolution).
123 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the 125 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the
124 watchdog's info structure). 126 watchdog's info structure).
127* get_timeleft: this routines returns the time that's left before a reset.
125* ioctl: if this routine is present then it will be called first before we do 128* ioctl: if this routine is present then it will be called first before we do
126 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD 129 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD
127 if a command is not supported. The parameters that are passed to the ioctl 130 if a command is not supported. The parameters that are passed to the ioctl