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

staging: comedi: quatech_daqp_cs: there are 4 digital inputs

This board has 4 digital inputs not 1. Fix the subdevice init.

The digital input lines are shared with other functions. Add a
comment about this.
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 23d4f024
...@@ -741,10 +741,21 @@ static int daqp_auto_attach(struct comedi_device *dev, ...@@ -741,10 +741,21 @@ static int daqp_auto_attach(struct comedi_device *dev,
if (ret) if (ret)
return ret; return ret;
/*
* Digital Input subdevice
* NOTE: The digital input lines are shared:
*
* Chan Normal Mode Expansion Mode
* ---- ----------------- ----------------------------
* 0 DI0, ext. trigger Same as normal mode
* 1 DI1 External gain select, lo bit
* 2 DI2, ext. clock Same as normal mode
* 3 DI3 External gain select, hi bit
*/
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->n_chan = 1; s->n_chan = 4;
s->maxdata = 1; s->maxdata = 1;
s->insn_bits = daqp_di_insn_bits; s->insn_bits = daqp_di_insn_bits;
......
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