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

staging: comedi: ni_660x: add a comment about the initial DIO state

The (*auto_attach) initializes all the DIO channels to a default state.
Add a comment for clarity.
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 aa94f288
......@@ -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);
......
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