Lines Matching full:buffer
9 #include <uapi/linux/iio/buffer.h>
10 #include <linux/iio/buffer.h>
16 * INDIO_BUFFER_FLAG_FIXED_WATERMARK - Watermark level of the buffer can not be
17 * configured. It has a fixed value which will be buffer specific.
23 * @store_to: actually store stuff to the buffer
26 * the buffer.
27 * @remove_from: remove scan from buffer. Drivers should calls this to
28 * remove a scan from a buffer.
30 * @space_available: returns the amount of bytes available in a buffer
34 * @set_length: set number of datums in buffer
35 * @enable: called if the buffer is attached to a device and the
38 * @disable: called if the buffer is attached to a device and the
40 * @release: called when the last reference to the buffer is dropped,
41 * should free all resources allocated by the buffer.
42 * @modes: Supported operating modes by this buffer type
45 * The purpose of this structure is to make the buffer element
47 * different buffer designs (space efficiency vs speed for example).
49 * It is worth noting that a given buffer implementation may only support a
54 int (*store_to)(struct iio_buffer *buffer, const void *data);
55 int (*read)(struct iio_buffer *buffer, size_t n, char __user *buf);
56 size_t (*data_available)(struct iio_buffer *buffer);
57 int (*remove_from)(struct iio_buffer *buffer, void *data);
58 int (*write)(struct iio_buffer *buffer, size_t n, const char __user *buf);
59 size_t (*space_available)(struct iio_buffer *buffer);
61 int (*request_update)(struct iio_buffer *buffer);
63 int (*set_bytes_per_datum)(struct iio_buffer *buffer, size_t bpd);
64 int (*set_length)(struct iio_buffer *buffer, unsigned int length);
66 int (*enable)(struct iio_buffer *buffer, struct iio_dev *indio_dev);
67 int (*disable)(struct iio_buffer *buffer, struct iio_dev *indio_dev);
69 void (*release)(struct iio_buffer *buffer);
76 * struct iio_buffer - general buffer structure
79 * those writing new buffer implementations.
82 /** @length: Number of datums in buffer. */
95 * @access: Buffer access functions associated with the
106 /** @pollq: Wait queue to allow for polling on the buffer. */
116 /* @buffer_attr_list: List of buffer attributes. */
120 * @buffer_group: Attributes of the new buffer group.
125 /* @attrs: Standard attributes of the buffer. */
128 /* @demux_bounce: Buffer for doing gather from incoming scan. */
137 /* @ref: Reference count of the buffer. */
142 * iio_update_buffers() - add or remove buffer from active list
143 * @indio_dev: device to add buffer to
144 * @insert_buffer: buffer to insert
154 * iio_buffer_init() - Initialize the buffer structure
155 * @buffer: buffer to be initialized
157 void iio_buffer_init(struct iio_buffer *buffer);
159 struct iio_buffer *iio_buffer_get(struct iio_buffer *buffer);
160 void iio_buffer_put(struct iio_buffer *buffer);
164 static inline void iio_buffer_get(struct iio_buffer *buffer) {} in iio_buffer_get() argument
165 static inline void iio_buffer_put(struct iio_buffer *buffer) {} in iio_buffer_put() argument