mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 15:19:38 +02:00

Update the devm_iio_dmaengine_buffer_setup() function to support specifying the buffer direction. Update the iio_dmaengine_buffer_submit() function to handle input buffers as well as output buffers. 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-4-5ca45b4de294@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
35 lines
989 B
C
35 lines
989 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright 2014-2015 Analog Devices Inc.
|
|
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
|
*/
|
|
|
|
#ifndef __IIO_DMAENGINE_H__
|
|
#define __IIO_DMAENGINE_H__
|
|
|
|
#include <linux/iio/buffer.h>
|
|
|
|
struct iio_dev;
|
|
struct device;
|
|
|
|
void iio_dmaengine_buffer_free(struct iio_buffer *buffer);
|
|
struct iio_buffer *iio_dmaengine_buffer_setup_ext(struct device *dev,
|
|
struct iio_dev *indio_dev,
|
|
const char *channel,
|
|
enum iio_buffer_direction dir);
|
|
|
|
#define iio_dmaengine_buffer_setup(dev, indio_dev, channel) \
|
|
iio_dmaengine_buffer_setup_ext(dev, indio_dev, channel, \
|
|
IIO_BUFFER_DIRECTION_IN)
|
|
|
|
int devm_iio_dmaengine_buffer_setup_ext(struct device *dev,
|
|
struct iio_dev *indio_dev,
|
|
const char *channel,
|
|
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, \
|
|
IIO_BUFFER_DIRECTION_IN)
|
|
|
|
#endif
|