summaryrefslogtreecommitdiff
path: root/Documentation/watchdog
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2011-07-22 18:56:38 +0000
committerWim Van Sebroeck <wim@iguana.be>2011-07-28 08:01:05 +0000
commit2fa03560ab3a6dd83cad9bfd5692179fc2ceabb3 (patch)
treeb208649368917b6c8d16c5cc737b2b83e906d074 /Documentation/watchdog
parent43316044d4f64da008d6aca7d4b60771b9a24eb8 (diff)
downloadlinux-exynos-2fa03560ab3a6dd83cad9bfd5692179fc2ceabb3.tar.gz
linux-exynos-2fa03560ab3a6dd83cad9bfd5692179fc2ceabb3.tar.bz2
linux-exynos-2fa03560ab3a6dd83cad9bfd5692179fc2ceabb3.zip
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:
struct watchdog_device {
const struct watchdog_info *info;
const struct watchdog_ops *ops;
+ unsigned int bootstatus;
void *driver_data;
unsigned long status;
};
@@ -49,6 +50,8 @@ It contains following fields:
* info: a pointer to a watchdog_info structure. This structure gives some
additional information about the watchdog timer itself. (Like it's unique name)
* ops: a pointer to the list of watchdog operations that the watchdog supports.
+* bootstatus: status of the device after booting (reported with watchdog
+ WDIOF_* status bits).
* driver_data: a pointer to the drivers private data of a watchdog device.
This data should only be accessed via the watchdog_set_drvadata and
watchdog_get_drvdata routines.
@@ -65,6 +68,7 @@ struct watchdog_ops {
int (*stop)(struct watchdog_device *);
/* optional operations */
int (*ping)(struct watchdog_device *);
+ unsigned int (*status)(struct watchdog_device *);
};
It 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:
the watchdog timer driver core does: to send a keepalive ping to the watchdog
timer hardware it will either use the ping operation (when available) or the
start operation (when the ping operation is not available).
+* status: this routine checks the status of the watchdog timer device. The
+ status of the device is reported with watchdog WDIOF_* status flags/bits.
The status bits should (preferably) be set with the set_bit and clear_bit alike
bit-operations. The status bits that are defined are: