diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2015-10-13 12:10:29 -0400 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2015-10-25 09:55:32 -0400 |
| commit | 2d6ca60f328450ff5c7802d0857d12e3711348ce (patch) | |
| tree | 1e3f39956aef3539819429946cbabf429a7fa1a1 /include/linux/iio | |
| parent | 670b19ae9bfdbcb4ce2c2ffb2ec1659a7f4a2074 (diff) | |
iio: Add a DMAengine framework based buffer
Add a generic fully device independent DMA buffer implementation that uses
the DMAegnine framework to perform the DMA transfers. This can be used by
converter drivers that whish to provide a DMA buffer for converters that
are connected to a DMA core that implements the DMAengine API.
Apart from allocating the buffer using iio_dmaengine_buffer_alloc() and
freeing it using iio_dmaengine_buffer_free() no additional converter driver
specific code is required when using this DMA buffer implementation.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/buffer-dmaengine.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/iio/buffer-dmaengine.h b/include/linux/iio/buffer-dmaengine.h new file mode 100644 index 000000000000..5dcddf427bb0 --- /dev/null +++ b/include/linux/iio/buffer-dmaengine.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2014-2015 Analog Devices Inc. | ||
| 3 | * Author: Lars-Peter Clausen <lars@metafoo.de> | ||
| 4 | * | ||
| 5 | * Licensed under the GPL-2 or later. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef __IIO_DMAENGINE_H__ | ||
| 9 | #define __IIO_DMAENGINE_H__ | ||
| 10 | |||
| 11 | struct iio_buffer; | ||
| 12 | struct device; | ||
| 13 | |||
| 14 | struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev, | ||
| 15 | const char *channel); | ||
| 16 | void iio_dmaengine_buffer_free(struct iio_buffer *buffer); | ||
| 17 | |||
| 18 | #endif | ||
