Commit 502552e1 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_660x: remove enum clock_config_register_bits

Remove this enum and add a define for the bit.
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 aa36af20
...@@ -155,6 +155,8 @@ enum ni_660x_register { ...@@ -155,6 +155,8 @@ enum ni_660x_register {
NI660X_NUM_REGS, NI660X_NUM_REGS,
}; };
#define NI660X_CLK_CFG_COUNTER_SWAP BIT(21)
#define NI660X_IO_CFG(x) (NI660X_IO_CFG_0_1 + ((x) / 2)) #define NI660X_IO_CFG(x) (NI660X_IO_CFG_0_1 + ((x) / 2))
#define NI660X_IO_CFG_OUT_SEL(_c, _s) (((_s) & 0x3) << (((_c) % 2) ? 0 : 8)) #define NI660X_IO_CFG_OUT_SEL(_c, _s) (((_s) & 0x3) << (((_c) % 2) ? 0 : 8))
#define NI660X_IO_CFG_OUT_SEL_MASK(_c) NI660X_IO_CFG_OUT_SEL((_c), 0x3) #define NI660X_IO_CFG_OUT_SEL_MASK(_c) NI660X_IO_CFG_OUT_SEL((_c), 0x3)
...@@ -280,11 +282,6 @@ static const struct ni_660x_register_data ni_660x_reg_data[NI660X_NUM_REGS] = { ...@@ -280,11 +282,6 @@ static const struct ni_660x_register_data ni_660x_reg_data[NI660X_NUM_REGS] = {
[NI660X_IO_CFG_38_39] = { 0x7a2, 2 } /* read/write */ [NI660X_IO_CFG_38_39] = { 0x7a2, 2 } /* read/write */
}; };
/* kind of ENABLE for the second counter */
enum clock_config_register_bits {
CounterSwap = 0x1 << 21
};
/* dma configuration register bits */ /* dma configuration register bits */
static inline unsigned dma_select_mask(unsigned dma_channel) static inline unsigned dma_select_mask(unsigned dma_channel)
{ {
...@@ -704,7 +701,7 @@ static void set_tio_counterswap(struct comedi_device *dev, int chip) ...@@ -704,7 +701,7 @@ static void set_tio_counterswap(struct comedi_device *dev, int chip)
* first chip. * first chip.
*/ */
if (chip) if (chip)
bits = CounterSwap; bits = NI660X_CLK_CFG_COUNTER_SWAP;
ni_660x_write_register(dev, chip, bits, NI660X_CLK_CFG); ni_660x_write_register(dev, chip, bits, NI660X_CLK_CFG);
} }
......
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