mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 08:51:46 -04:00
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: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b72116bb48
commit
0960777727
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user