diff options
author | Alan Cox <alan@linux.intel.com> | 2012-05-10 21:48:59 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-05-30 07:54:25 +0200 |
commit | 45f5fed30a6460ec58f159ff297a2974153a97de (patch) | |
tree | d173b2d22ed1187fb7ed2cb85015ddf5c545da05 /Documentation | |
parent | watchdog: watchdog_core.h: make functions extern (diff) | |
download | linux-45f5fed30a6460ec58f159ff297a2974153a97de.tar.xz linux-45f5fed30a6460ec58f159ff297a2974153a97de.zip |
watchdog: Add multiple device support
We keep the old /dev/watchdog interface file for the first watchdog via
miscdev. This is basically a cut and paste of the relevant interface code
from the rtc driver layer tweaked for watchdog.
Revised to fix problems noted by Hans de Goede
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/watchdog/watchdog-kernel-api.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt index 25fe4304f2fc..3c85fc7dc1f1 100644 --- a/Documentation/watchdog/watchdog-kernel-api.txt +++ b/Documentation/watchdog/watchdog-kernel-api.txt @@ -1,6 +1,6 @@ The Linux WatchDog Timer Driver Core kernel API. =============================================== -Last reviewed: 16-Mar-2012 +Last reviewed: 21-May-2012 Wim Van Sebroeck <wim@iguana.be> @@ -39,6 +39,8 @@ watchdog_device structure. The watchdog device structure looks like this: struct watchdog_device { + int id; + struct cdev cdev; const struct watchdog_info *info; const struct watchdog_ops *ops; unsigned int bootstatus; @@ -50,6 +52,12 @@ struct watchdog_device { }; It contains following fields: +* id: set by watchdog_register_device, id 0 is special. It has both a + /dev/watchdog0 cdev (dynamic major, minor 0) as well as the old + /dev/watchdog miscdev. The id is set automatically when calling + watchdog_register_device. +* cdev: cdev for the dynamic /dev/watchdog<id> device nodes. This + field is also populated by watchdog_register_device. * 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. |