diff options
author | David Lechner <dlechner@baylibre.com> | 2025-02-07 23:09:06 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-02-10 21:47:49 +0300 |
commit | 79f24971b4ffbdba9733365e298982c45338e6b1 (patch) | |
tree | f04b510bedd3e614daf77998b8fd221d60fdb6fe /include/linux/iio/buffer-dmaengine.h | |
parent | 4fe7fd17fe66a5e243c1de7ff32c29fac7039b8d (diff) | |
download | linux-79f24971b4ffbdba9733365e298982c45338e6b1.tar.xz |
iio: buffer-dmaengine: add devm_iio_dmaengine_buffer_setup_with_handle()
Add a new devm_iio_dmaengine_buffer_setup_with_handle() function to
handle cases where the DMA channel is managed by the caller rather than
being requested and released by the iio_dmaengine module.
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250207-dlech-mainline-spi-engine-offload-2-v8-9-e48a489be48c@baylibre.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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/iio/buffer-dmaengine.h b/include/linux/iio/buffer-dmaengine.h index 72a2e3fd8a5b..37f27545f69f 100644 --- a/include/linux/iio/buffer-dmaengine.h +++ b/include/linux/iio/buffer-dmaengine.h @@ -11,6 +11,7 @@ struct iio_dev; struct device; +struct dma_chan; void iio_dmaengine_buffer_teardown(struct iio_buffer *buffer); struct iio_buffer *iio_dmaengine_buffer_setup_ext(struct device *dev, @@ -26,6 +27,10 @@ int devm_iio_dmaengine_buffer_setup_ext(struct device *dev, struct iio_dev *indio_dev, const char *channel, enum iio_buffer_direction dir); +int devm_iio_dmaengine_buffer_setup_with_handle(struct device *dev, + struct iio_dev *indio_dev, + struct dma_chan *chan, + enum iio_buffer_direction dir); #define devm_iio_dmaengine_buffer_setup(dev, indio_dev, channel) \ devm_iio_dmaengine_buffer_setup_ext(dev, indio_dev, channel, \ |