linux/drivers/iio/buffer/kfifo_buf.c

// SPDX-License-Identifier: GPL-2.0-only
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/workqueue.h>
#include <linux/kfifo.h>
#include <linux/mutex.h>
#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/buffer_impl.h>
#include <linux/sched.h>
#include <linux/poll.h>

struct iio_kfifo {};

#define iio_to_kfifo(r)

static inline int __iio_allocate_kfifo(struct iio_kfifo *buf,
			size_t bytes_per_datum, unsigned int length)
{}

static int iio_request_update_kfifo(struct iio_buffer *r)
{}

static int iio_mark_update_needed_kfifo(struct iio_buffer *r)
{}

static int iio_set_bytes_per_datum_kfifo(struct iio_buffer *r, size_t bpd)
{}

static int iio_set_length_kfifo(struct iio_buffer *r, unsigned int length)
{}

static int iio_store_to_kfifo(struct iio_buffer *r,
			      const void *data)
{}

static int iio_read_kfifo(struct iio_buffer *r, size_t n, char __user *buf)
{}

static size_t iio_kfifo_buf_data_available(struct iio_buffer *r)
{}

static void iio_kfifo_buffer_release(struct iio_buffer *buffer)
{}

static size_t iio_kfifo_buf_space_available(struct iio_buffer *r)
{}

static int iio_kfifo_remove_from(struct iio_buffer *r, void *data)
{}

static int iio_kfifo_write(struct iio_buffer *r, size_t n,
	const char __user *buf)
{}

static const struct iio_buffer_access_funcs kfifo_access_funcs =;

struct iio_buffer *iio_kfifo_allocate(void)
{}
EXPORT_SYMBOL();

void iio_kfifo_free(struct iio_buffer *r)
{}
EXPORT_SYMBOL();

static void devm_iio_kfifo_release(struct device *dev, void *res)
{}

/**
 * devm_iio_kfifo_allocate - Resource-managed iio_kfifo_allocate()
 * @dev:		Device to allocate kfifo buffer for
 *
 * RETURNS:
 * Pointer to allocated iio_buffer on success, NULL on failure.
 */
static struct iio_buffer *devm_iio_kfifo_allocate(struct device *dev)
{}

/**
 * devm_iio_kfifo_buffer_setup_ext - Allocate a kfifo buffer & attach it to an IIO device
 * @dev: Device object to which to attach the life-time of this kfifo buffer
 * @indio_dev: The device the buffer should be attached to
 * @setup_ops: The setup_ops required to configure the HW part of the buffer (optional)
 * @buffer_attrs: Extra sysfs buffer attributes for this IIO buffer
 *
 * This function allocates a kfifo buffer via devm_iio_kfifo_allocate() and
 * attaches it to the IIO device via iio_device_attach_buffer().
 * This is meant to be a bit of a short-hand/helper function as there are a few
 * drivers that seem to do this.
 */
int devm_iio_kfifo_buffer_setup_ext(struct device *dev,
				    struct iio_dev *indio_dev,
				    const struct iio_buffer_setup_ops *setup_ops,
				    const struct iio_dev_attr **buffer_attrs)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();