summaryrefslogtreecommitdiff
path: root/drivers/iio/buffer
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2024-04-19 11:25:38 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-04-20 17:41:32 +0300
commit3afb27d15f8ddaa5ce5781d18bb249c683d29260 (patch)
treed7261270d12b2b9ba2423b84134d159167546ff6 /drivers/iio/buffer
parentc1b91566580c245cf1147745d174be5e059ace6b (diff)
downloadlinux-3afb27d15f8ddaa5ce5781d18bb249c683d29260.tar.xz
iio: buffer-dmaengine: Enable write support
Use the iio_dma_buffer_write() and iio_dma_buffer_space_available() functions provided by the buffer-dma core, to enable write support in the buffer-dmaengine code. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240419-iio-backend-axi-dac-v4-5-5ca45b4de294@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/buffer')
-rw-r--r--drivers/iio/buffer/industrialio-buffer-dmaengine.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
index 951012651018..918f6f8d65b6 100644
--- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c
+++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
@@ -123,12 +123,14 @@ static void iio_dmaengine_buffer_release(struct iio_buffer *buf)
static const struct iio_buffer_access_funcs iio_dmaengine_buffer_ops = {
.read = iio_dma_buffer_read,
+ .write = iio_dma_buffer_write,
.set_bytes_per_datum = iio_dma_buffer_set_bytes_per_datum,
.set_length = iio_dma_buffer_set_length,
.request_update = iio_dma_buffer_request_update,
.enable = iio_dma_buffer_enable,
.disable = iio_dma_buffer_disable,
.data_available = iio_dma_buffer_usage,
+ .space_available = iio_dma_buffer_usage,
.release = iio_dmaengine_buffer_release,
.modes = INDIO_BUFFER_HARDWARE,