Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06d0ac36 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: dmm32at: rename DMM32AT_AICONF



For aesthetics, rename this define used for the Analog Configuration register.
Define the bits of the register.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bbf0a305
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -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);