From: Ian Abbott <abbotti@mev.co.uk>
To: driverdev-devel@linuxdriverproject.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ian Abbott <abbotti@mev.co.uk>,
H Hartley Sweeten <hartleys@visionengravers.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] staging: comedi: ni_6527: reset edge detection registers
Date: Mon, 21 Jul 2014 17:29:06 +0100 [thread overview]
Message-ID: <1405960146-8959-3-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1405960146-8959-1-git-send-email-abbotti@mev.co.uk>
`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>
---
drivers/staging/comedi/drivers/ni_6527.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
index 57d8d4c..8ea93b5 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);
--
2.0.0
prev parent reply other threads:[~2014-07-21 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 16:29 [PATCH 0/2] staging: comedi: ni_6527 edge detection changes Ian Abbott
2014-07-21 16:29 ` [PATCH 1/2] staging: comedi: ni_6527: support INSN_CONFIG_DIGITAL_TRIG Ian Abbott
2014-07-21 16:29 ` Ian Abbott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405960146-8959-3-git-send-email-abbotti@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=hartleys@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®