staging: comedi: quatech_daqp_cs: there are 4 digital outputs
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 5 Oct 2015 21:22:48 +0000 (14:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:16:05 +0000 (21:16 -0700)
This board has 4 digital outputs not 1. Fix the subdevice init.

The digital output lines are used for the external channel selection
when the expansion mode is enabled. Add a comment about this.

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>
drivers/staging/comedi/drivers/quatech_daqp_cs.c

index 152cb146fc161fa62cfdd9b194bf9d0cc7edb08a..a4a5244ab8a862032dab9a072abfb7e1876f4d1a 100644 (file)
@@ -748,10 +748,17 @@ static int daqp_auto_attach(struct comedi_device *dev,
        s->maxdata      = 1;
        s->insn_bits    = daqp_di_insn_bits;
 
+       /*
+        * Digital Output subdevice
+        * NOTE: The digital output lines share the same pins on the
+        * interface connector as the four external channel selection
+        * bits. If expansion mode is used the digital outputs do not
+        * work.
+        */
        s = &dev->subdevices[3];
        s->type         = COMEDI_SUBD_DO;
        s->subdev_flags = SDF_WRITABLE;
-       s->n_chan       = 1;
+       s->n_chan       = 4;
        s->maxdata      = 1;
        s->insn_bits    = daqp_do_insn_bits;
 
This page took 0.025355 seconds and 5 git commands to generate.