#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/spinlock.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/buffer_impl.h>
#include <linux/iio/buffer-dma.h>
#include <linux/iio/buffer-dmaengine.h>
struct dmaengine_buffer { … };
static struct dmaengine_buffer *iio_buffer_to_dmaengine_buffer(
struct iio_buffer *buffer)
{ … }
static void iio_dmaengine_buffer_block_done(void *data,
const struct dmaengine_result *result)
{ … }
static int iio_dmaengine_buffer_submit_block(struct iio_dma_buffer_queue *queue,
struct iio_dma_buffer_block *block)
{ … }
static void iio_dmaengine_buffer_abort(struct iio_dma_buffer_queue *queue)
{ … }
static void iio_dmaengine_buffer_release(struct iio_buffer *buf)
{ … }
static const struct iio_buffer_access_funcs iio_dmaengine_buffer_ops = …;
static const struct iio_dma_buffer_ops iio_dmaengine_default_ops = …;
static ssize_t iio_dmaengine_buffer_get_length_align(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static IIO_DEVICE_ATTR(length_align_bytes, 0444,
iio_dmaengine_buffer_get_length_align, NULL, 0);
static const struct iio_dev_attr *iio_dmaengine_buffer_attrs[] = …;
static struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev,
const char *channel)
{ … }
void iio_dmaengine_buffer_free(struct iio_buffer *buffer)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
struct iio_buffer *iio_dmaengine_buffer_setup_ext(struct device *dev,
struct iio_dev *indio_dev,
const char *channel,
enum iio_buffer_direction dir)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static void __devm_iio_dmaengine_buffer_free(void *buffer)
{ … }
int devm_iio_dmaengine_buffer_setup_ext(struct device *dev,
struct iio_dev *indio_dev,
const char *channel,
enum iio_buffer_direction dir)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);