diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-04 22:30:11 +0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-07 05:06:17 +0400 |
| commit | 906a183ff06fd3eedba2d26f8bcc1ef78f9e56a5 (patch) | |
| tree | 78a93ae4cab274e011a640af87a905f6a5173b7f | |
| parent | c99e0e196ce98848792d345ec0ab9dca4d891b05 (diff) | |
| download | linux-906a183ff06fd3eedba2d26f8bcc1ef78f9e56a5.tar.xz | |
staging: comedi: pcl818: tidy up analog input registers
For aesthetics, rename the analog input register defines and convert
the offsets to hex.
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>
| -rw-r--r-- | drivers/staging/comedi/drivers/pcl818.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index 1783b6f6767e..4a8d9e1e195e 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c @@ -132,15 +132,12 @@ A word or two about DMA. Driver support DMA operations at two ways: /* W: counter enable */ #define PCL818_CNTENABLE 10 -/* R: low byte of A/D W: soft A/D trigger */ -#define PCL818_AD_LO 0 -/* R: high byte of A/D W: A/D range control */ -#define PCL818_AD_HI 1 +#define PCL818_AI_LSB_REG 0x00 +#define PCL818_AI_MSB_REG 0x01 #define PCL818_AO_LSB_REG(x) (0x04 + ((x) * 2)) #define PCL818_AO_MSB_REG(x) (0x05 + ((x) * 2)) #define PCL818_DO_DI_LSB_REG 0x03 #define PCL818_DO_DI_MSB_REG 0x0b - #define PCL818_TIMER_BASE 0x0c /* W: fifo enable/disable */ @@ -409,7 +406,7 @@ static void pcl818_ai_clear_eoc(struct comedi_device *dev) static void pcl818_ai_soft_trig(struct comedi_device *dev) { /* writing any value triggers a software conversion */ - outb(0, dev->iobase + PCL818_AD_LO); + outb(0, dev->iobase + PCL818_AI_LSB_REG); } static unsigned int pcl818_ai_get_fifo_sample(struct comedi_device *dev, @@ -433,8 +430,8 @@ static unsigned int pcl818_ai_get_sample(struct comedi_device *dev, { unsigned int val; - val = inb(dev->iobase + PCL818_AD_HI) << 8; - val |= inb(dev->iobase + PCL818_AD_LO); + val = inb(dev->iobase + PCL818_AI_MSB_REG) << 8; + val |= inb(dev->iobase + PCL818_AI_LSB_REG); if (chan) *chan = val & 0xf; |
