On 14/01/15 17:05, H Hartley Sweeten wrote:
Introduce a new helper module to consolidate all the ISA DMA code. This will
allow removing the "depends on ISA_DMA_API" from the legacy drivers that can
use DMA for async command support.

This module is complete based on the various uses of ISA DMA in the comedi
drivers.

Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
[snip]
diff --git a/drivers/staging/comedi/drivers/comedi_isadma.c 
b/drivers/staging/comedi/drivers/comedi_isadma.c
new file mode 100644
index 0000000..dbdea71
--- /dev/null
+++ b/drivers/staging/comedi/drivers/comedi_isadma.c
[snip]
+/**
+ * comedi_isadma_set_mode - set the ISA DMA transfer direction
+ * @desc:      the ISA DMA cookie to set
+ * @dma_dir:   the DMA direction
+ */

I think it's worth documenting the values of dma_dir there, i.e. COMEDI_ISADMA_READ or COMEDI_ISADMA_WRITE.

+void comedi_isadma_set_mode(struct comedi_isadma_desc *desc, char dma_dir)
+{
+       desc->mode = (dma_dir == COMEDI_ISADMA_READ) ? DMA_MODE_READ
+                                                    : DMA_MODE_WRITE;
+}
+EXPORT_SYMBOL_GPL(comedi_isadma_set_mode);
+
+/**
+ * comedi_isadma_alloc - allocate and initialize the ISA DMA
+ * @dev:       comedi_device struct
+ * @n_desc:    the number of cookies to allocate
+ * @dma_chan:  DMA channel for the first cookie
+ * @dma_chan2: DMA channel for the second cookie
+ * @maxsize:   the size of the buffer to allocate for each cookie
+ * @dma_dir:   the DMA direction
+ *
+ * Returns the allocated and initialized ISA DMA or NULL if anything fails.
+ */

Ditto.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbo...@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to