summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/addi_watchdog.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-17 17:41:01 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-18 12:52:54 -0800
commit2abcf87aeea500d28a953d4b02450f76820f899d (patch)
tree15463f81e6813dfece300e9113fbcae1e9e4fd83 /drivers/staging/comedi/drivers/addi_watchdog.h
parent7828f09660947ea7c15c4f02475d7789755939bc (diff)
staging: comedi: introduce addi_watchdog driver
Many of the ADDI-DATA drivers have a "watchdog" subdevice that can be used to monitor digital output activity. All the digital outputs are released (set to 0) if the digital outputs are not accessed, or the watchdog it not pinged, before the timeout of the watchdog occurs. The only difference in the drivers for the watchdog subdevice is the base address used to talk to the watchdog registers. Instead of duplicating the code needed to support this watchdog, introduce a helper module, similar to the 8255 module. This module will be select'ed by the drivers that can use it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_watchdog.h')
-rw-r--r--drivers/staging/comedi/drivers/addi_watchdog.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/addi_watchdog.h b/drivers/staging/comedi/drivers/addi_watchdog.h
new file mode 100644
index 000000000000..f374a7bff44d
--- /dev/null
+++ b/drivers/staging/comedi/drivers/addi_watchdog.h
@@ -0,0 +1,10 @@
+#ifndef _ADDI_WATCHDOG_H
+#define _ADDI_WATCHDOG_H
+
+#include "../comedidev.h"
+
+void addi_watchdog_reset(unsigned long iobase);
+int addi_watchdog_init(struct comedi_subdevice *, unsigned long iobase);
+void addi_watchdog_cleanup(struct comedi_subdevice *s);
+
+#endif