Lines Matching full:buffer
17 #include <linux/iio/buffer.h>
19 #include <linux/iio/buffer-dma.h>
20 #include <linux/iio/buffer-dmaengine.h>
23 * The IIO DMAengine buffer combines the generic IIO DMA buffer infrastructure
24 * with the DMAengine framework. The generic IIO DMA buffer infrastructure is
25 * used to manage the buffer memory and implement the IIO buffer operations
27 * this results in a device independent fully functional DMA buffer
43 struct iio_buffer *buffer) in iio_buffer_to_dmaengine_buffer() argument
45 return container_of(buffer, struct dmaengine_buffer, queue.buffer); in iio_buffer_to_dmaengine_buffer()
65 iio_buffer_to_dmaengine_buffer(&queue->buffer); in iio_dmaengine_buffer_submit_block()
98 iio_buffer_to_dmaengine_buffer(&queue->buffer); in iio_dmaengine_buffer_abort()
137 iio_buffer_to_dmaengine_buffer(indio_dev->buffer); in iio_dmaengine_buffer_get_length_align()
151 * iio_dmaengine_buffer_alloc() - Allocate new buffer which uses DMAengine
152 * @dev: Parent device for the buffer
155 * This allocates a new IIO buffer which internally uses the DMAengine framework
159 * Once done using the buffer iio_dmaengine_buffer_free() should be used to
203 iio_buffer_set_attrs(&dmaengine_buffer->queue.buffer, in iio_dmaengine_buffer_alloc()
206 dmaengine_buffer->queue.buffer.access = &iio_dmaengine_buffer_ops; in iio_dmaengine_buffer_alloc()
208 return &dmaengine_buffer->queue.buffer; in iio_dmaengine_buffer_alloc()
216 * iio_dmaengine_buffer_free() - Free dmaengine buffer
217 * @buffer: Buffer to free
219 * Frees a buffer previously allocated with iio_dmaengine_buffer_alloc().
221 static void iio_dmaengine_buffer_free(struct iio_buffer *buffer) in iio_dmaengine_buffer_free() argument
224 iio_buffer_to_dmaengine_buffer(buffer); in iio_dmaengine_buffer_free()
229 iio_buffer_put(buffer); in iio_dmaengine_buffer_free()
239 * @dev: Parent device for the buffer
242 * This allocates a new IIO buffer which internally uses the DMAengine framework
246 * The buffer will be automatically de-allocated once the device gets destroyed.
251 struct iio_buffer **bufferp, *buffer; in devm_iio_dmaengine_buffer_alloc() local
258 buffer = iio_dmaengine_buffer_alloc(dev, channel); in devm_iio_dmaengine_buffer_alloc()
259 if (IS_ERR(buffer)) { in devm_iio_dmaengine_buffer_alloc()
261 return buffer; in devm_iio_dmaengine_buffer_alloc()
264 *bufferp = buffer; in devm_iio_dmaengine_buffer_alloc()
267 return buffer; in devm_iio_dmaengine_buffer_alloc()
272 MODULE_DESCRIPTION("DMA buffer for the IIO framework");