diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-04 22:30:10 +0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-07 05:06:17 +0400 |
| commit | c99e0e196ce98848792d345ec0ab9dca4d891b05 (patch) | |
| tree | c32f91ae0735efa9d743be8891f48284dde05b6c | |
| parent | 9ab7fbd861ab75c3c731811d046c7e85b7780d53 (diff) | |
| download | linux-c99e0e196ce98848792d345ec0ab9dca4d891b05.tar.xz | |
staging: comedi: pcl816: 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/pcl816.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index f77bc68ba12f..55869106e158 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -47,6 +47,8 @@ Configuration Options: #define PCL816_DO_DI_LSB_REG 0x00 #define PCL816_DO_DI_MSB_REG 0x01 #define PCL816_TIMER_BASE 0x04 +#define PCL816_AI_LSB_REG 0x08 +#define PCL816_AI_MSB_REG 0x09 /* R: A/D high byte W: A/D range control */ #define PCL816_RANGE 9 @@ -61,11 +63,6 @@ Configuration Options: #define PCL816_STATUS 13 #define PCL816_STATUS_DRDY_MASK 0x80 -/* R: low byte of A/D W: soft A/D trigger */ -#define PCL816_AD_LO 8 -/* R: high byte of A/D W: A/D range control */ -#define PCL816_AD_HI 9 - #define MAGIC_DMA_WORD 0x5a5a static const struct comedi_lrange range_pcl816 = { @@ -217,7 +214,7 @@ static void pcl816_ai_clear_eoc(struct comedi_device *dev) static void pcl816_ai_soft_trig(struct comedi_device *dev) { /* writing any value triggers a software conversion */ - outb(0, dev->iobase + PCL816_AD_LO); + outb(0, dev->iobase + PCL816_AI_LSB_REG); } static unsigned int pcl816_ai_get_sample(struct comedi_device *dev, @@ -225,8 +222,8 @@ static unsigned int pcl816_ai_get_sample(struct comedi_device *dev, { unsigned int val; - val = inb(dev->iobase + PCL816_AD_HI) << 8; - val |= inb(dev->iobase + PCL816_AD_LO); + val = inb(dev->iobase + PCL816_AI_MSB_REG) << 8; + val |= inb(dev->iobase + PCL816_AI_LSB_REG); return val & s->maxdata; } |
