mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01: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 <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Signed-off-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
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 <[email protected]>
|
|
*/
|
|
|
|
#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
|