summaryrefslogtreecommitdiff
path: root/include/linux/iio/buffer-dmaengine.h
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-02-10 23:57:16 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-02-19 22:32:21 +0300
commit9c446288d7b31402adb454535cb2c3cbdb55bb88 (patch)
tree555f0de668c142abe1d066a8e671c2343e19a887 /include/linux/iio/buffer-dmaengine.h
parent4b0b159a194f6f2dd967532951474c0b6bb2b456 (diff)
downloadlinux-9c446288d7b31402adb454535cb2c3cbdb55bb88.tar.xz
iio: buffer-dmaengine: export buffer alloc and free functions
Export iio_dmaengine_buffer_free() and iio_dmaengine_buffer_alloc(). This is in preparation of introducing IIO backends support. This will allow us to allocate a buffer and control it's lifetime from a device different from the one holding the DMA firmware properties. Effectively, in this case the struct device holding the firmware information about the DMA channels is not the same as iio_dev->dev.parent (typical case). While at it, namespace the buffer-dmaengine exports and update the current user of these buffers. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240210-iio-backend-v11-4-f5242a5fb42a@analog.com Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/buffer-dmaengine.h')
-rw-r--r--include/linux/iio/buffer-dmaengine.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/buffer-dmaengine.h b/include/linux/iio/buffer-dmaengine.h
index 5c355be89814..cbb8ba957fad 100644
--- a/include/linux/iio/buffer-dmaengine.h
+++ b/include/linux/iio/buffer-dmaengine.h
@@ -10,6 +10,9 @@
struct iio_dev;
struct device;
+struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev,
+ const char *channel);
+void iio_dmaengine_buffer_free(struct iio_buffer *buffer);
int devm_iio_dmaengine_buffer_setup(struct device *dev,
struct iio_dev *indio_dev,
const char *channel);