Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: buffer-dmaengine: enable .get_dma_dev()

Wire up the .get_dma_dev() callback to use the DMA buffer infrastructure's
implementation. This ensures that DMABUF operations use the correct DMA
device for mapping, which is essential for proper operation on systems
where memory is mapped above the 32-bit range.

Without this callback, the core would fall back to using the IIO device's
parent, which may not have the appropriate DMA mask configuration for
high memory access.

Fixes: 7a86d469983a ("iio: buffer-dmaengine: Support new DMABUF based userspace API")
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
3db847df f9c198c3

+2
+2
drivers/iio/buffer/industrialio-buffer-dmaengine.c
··· 177 177 .lock_queue = iio_dma_buffer_lock_queue, 178 178 .unlock_queue = iio_dma_buffer_unlock_queue, 179 179 180 + .get_dma_dev = iio_dma_buffer_get_dma_dev, 181 + 180 182 .modes = INDIO_BUFFER_HARDWARE, 181 183 .flags = INDIO_BUFFER_FLAG_FIXED_WATERMARK, 182 184 };