From: Chase Southwood <chase.southwood@gmail.com>
To: gregkh@linuxfoundation.org
Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Chase Southwood <chase.southwood@gmail.com>
Subject: [PATCH 2/3] staging: comedi: addi_apci_1564: fix use of apci1564_reset() to disable DI interrupts
Date: Fri, 27 Jun 2014 23:49:19 -0500 [thread overview]
Message-ID: <1403930959-28211-1-git-send-email-chase.southwood@gmail.com> (raw)
In-Reply-To: <1403930876-27678-1-git-send-email-chase.southwood@gmail.com>
apci1564_cos_insn_config() is currently using apci1564_reset() to disable
digital input interrupts when the configuration operation is
COMEDI_DIGITAL_TRIG_DISABLE. However, this is incorrect as the device reset
function also resets the registers for the digital outputs, timer, watchdog, and
counters as well. Replace the reset function call with a direct disabling of
just the digital input interrupts.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
drivers/staging/comedi/drivers/addi_apci_1564.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 59786e7..0141ed9 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -285,7 +285,10 @@ static int apci1564_cos_insn_config(struct comedi_device *dev,
devpriv->ctrl = 0;
devpriv->mode1 = 0;
devpriv->mode2 = 0;
- apci1564_reset(dev);
+ outl(0x0, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+ inl(devpriv->amcc_iobase + APCI1564_DI_INT_STATUS_REG);
+ outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE1_REG);
+ outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE2_REG);
break;
case COMEDI_DIGITAL_TRIG_ENABLE_EDGES:
if (devpriv->ctrl != (APCI1564_DI_INT_ENABLE |
--
2.0.1
next prev parent reply other threads:[~2014-06-28 4:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-28 4:47 [PATCH 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups Chase Southwood
2014-06-28 4:48 ` [PATCH 1/3] staging: comedi: addi_apci_1564: move addi_watchdog.h include to addi_apci_1564.c Chase Southwood
2014-06-28 4:49 ` Chase Southwood [this message]
2014-06-28 4:50 ` [PATCH 3/3] staging: comedi: addi_apci_1564: clean up apci1564_interrupt() Chase Southwood
2014-06-30 10:25 ` [PATCH 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups Ian Abbott
2014-07-02 2:06 ` Chase Southwood
2014-07-03 2:15 ` [PATCH v2 " Chase Southwood
2014-07-03 2:16 ` [PATCH v2 1/3] staging: comedi: addi_apci_1564: move addi_watchdog.h include to addi_apci_1564.c Chase Southwood
2014-07-03 2:17 ` [PATCH v2 2/3] staging: comedi: addi_apci_1564: fix use of apci1564_reset() to disable DI interrupts Chase Southwood
2014-07-03 2:17 ` [PATCH v2 3/3] staging: comedi: addi_apci_1564: clean up apci1564_interrupt() Chase Southwood
2014-07-03 9:39 ` [PATCH v2 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups Ian Abbott
2014-07-04 2:50 ` Chase Southwood
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=1403930959-28211-1-git-send-email-chase.southwood@gmail.com \
--to=chase.southwood@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@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;
as well as URLs for NNTP newsgroup(s).