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

staging: comedi: adv_pci1724: prefer using the BIT macro

As suggested by checkpatch.pl, use the BIT macro to define the
register 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 ce6295e2
......@@ -54,16 +54,17 @@
* PCI bar 2 Register I/O map (dev->iobase)
*/
#define PCI1724_DAC_CTRL_REG 0x00
#define PCI1724_DAC_CTRL_GX(x) (1 << (20 + ((x) / 8)))
#define PCI1724_DAC_CTRL_GX(x) BIT(20 + ((x) / 8))
#define PCI1724_DAC_CTRL_CX(x) (((x) % 8) << 16)
#define PCI1724_DAC_CTRL_MODE_GAIN (1 << 14)
#define PCI1724_DAC_CTRL_MODE_OFFSET (2 << 14)
#define PCI1724_DAC_CTRL_MODE_NORMAL (3 << 14)
#define PCI1724_DAC_CTRL_MODE_MASK (3 << 14)
#define PCI1724_DAC_CTRL_MODE(x) (((x) & 0x3) << 14)
#define PCI1724_DAC_CTRL_MODE_GAIN PCI1724_DAC_CTRL_MODE(1)
#define PCI1724_DAC_CTRL_MODE_OFFSET PCI1724_DAC_CTRL_MODE(2)
#define PCI1724_DAC_CTRL_MODE_NORMAL PCI1724_DAC_CTRL_MODE(3)
#define PCI1724_DAC_CTRL_MODE_MASK PCI1724_DAC_CTRL_MODE(3)
#define PCI1724_DAC_CTRL_DATA(x) (((x) & 0x3fff) << 0)
#define PCI1724_SYNC_CTRL_REG 0x04
#define PCI1724_SYNC_CTRL_DACSTAT (1 << 1)
#define PCI1724_SYNC_CTRL_SYN (1 << 0)
#define PCI1724_SYNC_CTRL_DACSTAT BIT(1)
#define PCI1724_SYNC_CTRL_SYN BIT(0)
#define PCI1724_EEPROM_CTRL_REG 0x08
#define PCI1724_SYNC_TRIG_REG 0x0c /* any value works */
#define PCI1724_BOARD_ID_REG 0x10
......
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