summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/pcl812.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-03-04 11:30:14 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 17:06:17 -0800
commit598e61e6dd42cc865ca34a1213054946a99489ff (patch)
tree5f2e482f247b065756b3e2d4b3655bdeb62074f8 /drivers/staging/comedi/drivers/pcl812.c
parentf72196eca4ec8159b61a47e19f84d32446b3cede (diff)
staging: comedi: pcl812: define the status register bits
Define the bits in the status register. Writing any value to the status register clears any pending interrupt. For aesthetics, rename the status register and remove the "clrint" register. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/pcl812.c')
-rw-r--r--drivers/staging/comedi/drivers/pcl812.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index 7d13a99e3f5d..7e105c872b95 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -139,7 +139,8 @@
#define PCL812_AO_MSB_REG(x) (0x05 + ((x) * 2))
#define PCL812_DI_LSB_REG 0x06
#define PCL812_DI_MSB_REG 0x07
-#define PCL812_CLRINT 8
+#define PCL812_STATUS_REG 0x08
+#define PCL812_STATUS_DRDY (1 << 5)
#define PCL812_GAIN 9
#define PCL812_MUX 10
#define PCL812_MODE 11
@@ -148,10 +149,6 @@
#define PCL812_DO_LSB_REG 0x0d
#define PCL812_DO_MSB_REG 0x0e
-#define ACL8216_STATUS 8 /* 5. bit signalize data ready */
-
-#define ACL8216_DRDY 0x20 /* =0 data ready */
-
#define MAX_CHANLIST_LEN 256 /* length of scan list */
static const struct comedi_lrange range_pcl812pg_ai = {
@@ -639,7 +636,7 @@ static void pcl812_ai_setup_next_dma(struct comedi_device *dev,
static void pcl812_ai_clear_eoc(struct comedi_device *dev)
{
/* writing any value clears the interrupt request */
- outb(0, dev->iobase + PCL812_CLRINT);
+ outb(0, dev->iobase + PCL812_STATUS_REG);
}
static void pcl812_ai_soft_trig(struct comedi_device *dev)
@@ -667,8 +664,8 @@ static int pcl812_ai_eoc(struct comedi_device *dev,
unsigned int status;
if (s->maxdata > 0x0fff) {
- status = inb(dev->iobase + ACL8216_STATUS);
- if ((status & ACL8216_DRDY) == 0)
+ status = inb(dev->iobase + PCL812_STATUS_REG);
+ if ((status & PCL812_STATUS_DRDY) == 0)
return 0;
} else {
status = inb(dev->iobase + PCL812_AI_MSB_REG);