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

staging: comedi: ni_at_ao: tidy up digital i/o register defines

The digital in and digital out registers on this board share the same
address. They also effect the same digital i/o pins. To make this clear
combine the two defines.
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 b72116bb
......@@ -42,8 +42,7 @@ Configuration options:
/*
* Register map
*/
#define ATAO_DIN 0x00 /* R 16 */
#define ATAO_DOUT 0x00 /* W 16 */
#define ATAO_DIO_REG 0x00
#define ATAO_CFG2 0x02 /* W 16 */
#define CALLD1 (1 << 15)
#define CALLD0 (1 << 14)
......@@ -228,9 +227,9 @@ static int atao_dio_insn_bits(struct comedi_device *dev,
unsigned int *data)
{
if (comedi_dio_update_state(s, data))
outw(s->state, dev->iobase + ATAO_DOUT);
outw(s->state, dev->iobase + ATAO_DIO_REG);
data[1] = inw(dev->iobase + ATAO_DIN);
data[1] = inw(dev->iobase + ATAO_DIO_REG);
return insn->n;
}
......
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