diff options
| author | H Hartley Sweeten <[email protected]> | 2015-10-05 14:22:49 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-10-12 21:16:05 -0700 |
| commit | 4d6b700801bfeef15a059fc6739bfcd741cd9c15 (patch) | |
| tree | 1c08211c91c2d4752b688e9ea2150ac90fb6029f | |
| parent | 23d4f0245f6f48ee374069110b86c75166d1e152 (diff) | |
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: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/comedi/drivers/quatech_daqp_cs.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index a4a5244ab8a8..b2effb876b77 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -741,10 +741,21 @@ static int daqp_auto_attach(struct comedi_device *dev, if (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->type = COMEDI_SUBD_DI; s->subdev_flags = SDF_READABLE; - s->n_chan = 1; + s->n_chan = 4; s->maxdata = 1; s->insn_bits = daqp_di_insn_bits; |