summaryrefslogtreecommitdiff
path: root/include/linux/iio/kfifo_buf.h
blob: 22874da0c8be96ea8f29784499568fa423159314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_IIO_KFIFO_BUF_H__
#define __LINUX_IIO_KFIFO_BUF_H__

struct iio_buffer;
struct iio_buffer_setup_ops;
struct iio_dev;
struct iio_dev_attr;
struct device;

struct iio_buffer *iio_kfifo_allocate(void);
void iio_kfifo_free(struct iio_buffer *r);

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);

#define devm_iio_kfifo_buffer_setup(dev, indio_dev, setup_ops)	\
	devm_iio_kfifo_buffer_setup_ext((dev), (indio_dev), (setup_ops), NULL)

#endif