Commit 77e546de authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: quatech_daqp_cs: tidy up scanlist register bits

For aesthetics, move the bit defines for this register and use the
BIT macro to define the bits.
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 bd9d00f1
......@@ -55,7 +55,15 @@
* access the 16-bit data. Data is transferred LSB then MSB.
*/
#define DAQP_AI_FIFO_REG 0x00
#define DAQP_SCANLIST_REG 0x01
#define DAQP_SCANLIST_DIFFERENTIAL BIT(14)
#define DAQP_SCANLIST_GAIN(x) (((x) & 0x3) << 12)
#define DAQP_SCANLIST_CHANNEL(x) (((x) & 0xf) << 8)
#define DAQP_SCANLIST_START BIT(7)
#define DAQP_SCANLIST_EXT_GAIN(x) (((x) & 0x3) << 4)
#define DAQP_SCANLIST_EXT_CHANNEL(x) (((x) & 0xf) << 0)
#define DAQP_CTRL_REG 0x02
#define DAQP_STATUS_REG 0x02
#define DAQP_DI_REG 0x03
......@@ -68,13 +76,6 @@
#define DAQP_TIMER_REG 0x0a
#define DAQP_AUX_REG 0x0f
#define DAQP_SCANLIST_DIFFERENTIAL 0x4000
#define DAQP_SCANLIST_GAIN(x) ((x) << 12)
#define DAQP_SCANLIST_CHANNEL(x) ((x) << 8)
#define DAQP_SCANLIST_START 0x0080
#define DAQP_SCANLIST_EXT_GAIN(x) ((x) << 4)
#define DAQP_SCANLIST_EXT_CHANNEL(x) (x)
#define DAQP_CONTROL_PACER_CLK(x) (((x) & 0x3) << 6)
#define DAQP_CONTROL_PACER_CLK_EXT DAQP_CONTROL_PACER_CLK(0)
#define DAQP_CONTROL_PACER_CLK_5MHZ DAQP_CONTROL_PACER_CLK(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment