staging: comedi: dmm32at: rename DMM32AT_AICONF
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 11 Nov 2014 23:55:43 +0000 (16:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:33:25 +0000 (15:33 -0800)
For aesthetics, rename this define used for the Analog Configuration register.
Define the bits of the 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>
drivers/staging/comedi/drivers/dmm32at.c

index b2da8193a383e2f354dde8cd1e081acd64009adb..ff88810c622dbae689700a42f318f6ddd3672d57 100644 (file)
@@ -99,8 +99,15 @@ Configuration Options:
 #define DMM32AT_CTRDIO_CFG_GT0EN       (1 << 2)  /* J3.47 1=DIN1 is GATE0 */
 #define DMM32AT_CTRDIO_CFG_SRC0                (1 << 1)  /* CLK0 is 0=FREQ0 1=J3.48 */
 #define DMM32AT_CTRDIO_CFG_GT12EN      (1 << 0)  /* J3.46 1=DIN2 is GATE12 */
+#define DMM32AT_AI_CFG_REG             0x0b
+#define DMM32AT_AI_CFG_SCINT_20US      (0 << 4)
+#define DMM32AT_AI_CFG_SCINT_15US      (1 << 4)
+#define DMM32AT_AI_CFG_SCINT_10US      (2 << 4)
+#define DMM32AT_AI_CFG_SCINT_5US       (3 << 4)
+#define DMM32AT_AI_CFG_RANGE           (1 << 3)  /* 0=5V  1=10V */
+#define DMM32AT_AI_CFG_ADBU            (1 << 2)  /* 0=bipolar  1=unipolar */
+#define DMM32AT_AI_CFG_GAIN(x)         ((x) << 0)
 
-#define DMM32AT_AICONF 0x0b
 #define DMM32AT_AIRBACK 0x0b
 
 #define DMM32AT_CLK1 0x0d
@@ -111,15 +118,11 @@ Configuration Options:
 
 /* Board register values. */
 
-/* DMM32AT_AICONF 0x0b */
+/* DMM32AT_AI_CFG_REG 0x0b */
 #define DMM32AT_RANGE_U10 0x0c
 #define DMM32AT_RANGE_U5 0x0d
 #define DMM32AT_RANGE_B10 0x08
 #define DMM32AT_RANGE_B5 0x00
-#define DMM32AT_SCINT_20 0x00
-#define DMM32AT_SCINT_15 0x10
-#define DMM32AT_SCINT_10 0x20
-#define DMM32AT_SCINT_5 0x30
 
 /* DMM32AT_CLKCT 0x0f */
 #define DMM32AT_CLKCT1 0x56    /* mode3 counter 1 - write low byte only */
@@ -171,7 +174,7 @@ static void dmm32at_ai_set_chanspec(struct comedi_device *dev,
 
        outb(chan, dev->iobase + DMM32AT_AI_LO_CHAN_REG);
        outb(last_chan, dev->iobase + DMM32AT_AI_HI_CHAN_REG);
-       outb(dmm32at_rangebits[range], dev->iobase + DMM32AT_AICONF);
+       outb(dmm32at_rangebits[range], dev->iobase + DMM32AT_AI_CFG_REG);
 }
 
 static unsigned int dmm32at_ai_get_sample(struct comedi_device *dev,
@@ -511,7 +514,7 @@ static int dmm32at_reset(struct comedi_device *dev)
        outb(0xff, dev->iobase + DMM32AT_AI_HI_CHAN_REG);
 
        /* set the range at 10v unipolar */
-       outb(DMM32AT_RANGE_U10, dev->iobase + DMM32AT_AICONF);
+       outb(DMM32AT_RANGE_U10, dev->iobase + DMM32AT_AI_CFG_REG);
 
        /* should take 10 us to settle, here's a hundred */
        udelay(100);
This page took 0.027014 seconds and 5 git commands to generate.