iio: buffer-dma: add iio_dmaengine_buffer_setup()
authorNuno Sa <nuno.sa@analog.com>
Fri, 19 Apr 2024 08:25:34 +0000 (10:25 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 20 Apr 2024 14:36:41 +0000 (15:36 +0100)
commita094de22e2efc2ec7f540d10d1edb7038f863925
tree58c7c06bb0088d141588cbcde5645a3f2518dce9
parent5826711e841450755cae32bacc59f6465075db94
iio: buffer-dma: add iio_dmaengine_buffer_setup()

This brings the DMA buffer API more in line with what we have in the
triggered buffer. There's no need of having both
devm_iio_dmaengine_buffer_setup() and devm_iio_dmaengine_buffer_alloc().
Hence we introduce the new iio_dmaengine_buffer_setup() that together
with devm_iio_dmaengine_buffer_setup() should be all we need.

Note that as part of this change iio_dmaengine_buffer_alloc() is again
static and the axi-adc was updated accordingly.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240419-iio-backend-axi-dac-v4-1-5ca45b4de294@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/adi-axi-adc.c
drivers/iio/buffer/industrialio-buffer-dmaengine.c
include/linux/iio/buffer-dmaengine.h