staging: comedi: ni_660x: add a comment about the initial DIO state
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 22 Mar 2016 18:10:34 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
The (*auto_attach) initializes all the DIO channels to a default state.
Add a comment for clarity.

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/ni_660x.c

index 3415a15650fe1729145a08e7d0d311411a281085..6f84946ea9a4ca0d35ecedb7945d4771901abc94 100644 (file)
@@ -1073,6 +1073,11 @@ static int ni_660x_auto_attach(struct comedi_device *dev,
        for (i = 0; i < n_counters; ++i)
                ni_tio_init_counter(&devpriv->counter_dev->counters[i]);
 
+        /*
+         * Default the DIO channels as:
+         *   chan 0-7:  DIO inputs
+         *   chan 8-39: counter signal inputs
+         */
        for (i = 0; i < NUM_PFI_CHANNELS; ++i) {
                if (i < 8)
                        ni_660x_set_pfi_routing(dev, i, NI_660X_PFI_OUTPUT_DIO);