summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2014-07-21 17:29:06 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-22 16:07:05 -0700
commite44c53920fc7feafc412e547e0a8d62530b1a28d (patch)
tree18a0f8dbba4b4e2100099e1db1a3fcee143f4e8f
parent110f9e687c1a8490383612817ac03f4b29861da1 (diff)
staging: comedi: ni_6527: reset edge detection registers
`ni6527_reset()` is called to reset various registers when the device is being initialized or deinitialized. The edge detection interrupt is disabled by this function, but the rising and falling edge detection registers are currently left alone. Call `ni6527_set_edge_detection()` to set them to a known, disabled state. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/ni_6527.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
index 57d8d4c30459..8ea93b584526 100644
--- a/drivers/staging/comedi/drivers/ni_6527.c
+++ b/drivers/staging/comedi/drivers/ni_6527.c
@@ -393,6 +393,9 @@ static void ni6527_reset(struct comedi_device *dev)
/* disable deglitch filters on all channels */
ni6527_set_filter_enable(dev, 0);
+ /* disable edge detection */
+ ni6527_set_edge_detection(dev, 0xffffffff, 0, 0);
+
writeb(NI6527_CLR_IRQS | NI6527_CLR_RESET_FILT,
mmio + NI6527_CLR_REG);
writeb(NI6527_CTRL_DISABLE_IRQS, mmio + NI6527_CTRL_REG);