aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2011-07-22 14:56:38 -0400
committerWim Van Sebroeck <wim@iguana.be>2011-07-28 04:01:05 -0400
commit2fa03560ab3a6dd83cad9bfd5692179fc2ceabb3 (patch)
treeb208649368917b6c8d16c5cc737b2b83e906d074 /Documentation/watchdog
parent43316044d4f64da008d6aca7d4b60771b9a24eb8 (diff)
watchdog: WatchDog Timer Driver Core - Add basic ioctl functionality
This part add's the basic ioctl functionality to the WatchDog Timer Driver Core framework. The supported ioctl call's are: WDIOC_GETSUPPORT WDIOC_GETSTATUS WDIOC_GETBOOTSTATUS Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 3db67e74b80e..2bdc6dc6e04c 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -41,6 +41,7 @@ The watchdog device structure looks like this:
41struct watchdog_device { 41struct watchdog_device {
42 const struct watchdog_info *info; 42 const struct watchdog_info *info;
43 const struct watchdog_ops *ops; 43 const struct watchdog_ops *ops;
44 unsigned int bootstatus;
44 void *driver_data; 45 void *driver_data;
45 unsigned long status; 46 unsigned long status;
46}; 47};
@@ -49,6 +50,8 @@ It contains following fields:
49* info: a pointer to a watchdog_info structure. This structure gives some 50* info: a pointer to a watchdog_info structure. This structure gives some
50 additional information about the watchdog timer itself. (Like it's unique name) 51 additional information about the watchdog timer itself. (Like it's unique name)
51* ops: a pointer to the list of watchdog operations that the watchdog supports. 52* ops: a pointer to the list of watchdog operations that the watchdog supports.
53* bootstatus: status of the device after booting (reported with watchdog
54 WDIOF_* status bits).
52* driver_data: a pointer to the drivers private data of a watchdog device. 55* driver_data: a pointer to the drivers private data of a watchdog device.
53 This data should only be accessed via the watchdog_set_drvadata and 56 This data should only be accessed via the watchdog_set_drvadata and
54 watchdog_get_drvdata routines. 57 watchdog_get_drvdata routines.
@@ -65,6 +68,7 @@ struct watchdog_ops {
65 int (*stop)(struct watchdog_device *); 68 int (*stop)(struct watchdog_device *);
66 /* optional operations */ 69 /* optional operations */
67 int (*ping)(struct watchdog_device *); 70 int (*ping)(struct watchdog_device *);
71 unsigned int (*status)(struct watchdog_device *);
68}; 72};
69 73
70It is important that you first define the module owner of the watchdog timer 74It is important that you first define the module owner of the watchdog timer
@@ -97,6 +101,8 @@ they are supported. These optional routines/operations are:
97 the watchdog timer driver core does: to send a keepalive ping to the watchdog 101 the watchdog timer driver core does: to send a keepalive ping to the watchdog
98 timer hardware it will either use the ping operation (when available) or the 102 timer hardware it will either use the ping operation (when available) or the
99 start operation (when the ping operation is not available). 103 start operation (when the ping operation is not available).
104* status: this routine checks the status of the watchdog timer device. The
105 status of the device is reported with watchdog WDIOF_* status flags/bits.
100 106
101The status bits should (preferably) be set with the set_bit and clear_bit alike 107The status bits should (preferably) be set with the set_bit and clear_bit alike
102bit-operations. The status bits that are defined are: 108bit-operations. The status bits that are defined are: