[PATCH 24/42] staging: comedi: ni_660x: add a comment about the initial DIO state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The (*auto_attach) initializes all the DIO channels to a default state.
Add a comment for clarity.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_660x.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c
index 3415a15..6f84946 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -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);
-- 
2.6.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux