Lines Matching full:buffer

9 #include <uapi/linux/iio/buffer.h>
10 #include <linux/iio/buffer.h>
20 * INDIO_BUFFER_FLAG_FIXED_WATERMARK - Watermark level of the buffer can not be
21 * configured. It has a fixed value which will be buffer specific.
27 * @store_to: actually store stuff to the buffer
30 * the buffer.
31 * @remove_from: remove scan from buffer. Drivers should calls this to
32 * remove a scan from a buffer.
34 * @space_available: returns the amount of bytes available in a buffer
38 * @set_length: set number of datums in buffer
39 * @enable: called if the buffer is attached to a device and the
42 * @disable: called if the buffer is attached to a device and the
44 * @release: called when the last reference to the buffer is dropped,
45 * should free all resources allocated by the buffer.
51 * object to this buffer. Requires a valid DMABUF fd, that
52 * was previouly attached to this buffer.
53 * @lock_queue: called when the core needs to lock the buffer queue;
55 * @unlock_queue: used to unlock a previously locked buffer queue
56 * @modes: Supported operating modes by this buffer type
59 * The purpose of this structure is to make the buffer element
61 * different buffer designs (space efficiency vs speed for example).
63 * It is worth noting that a given buffer implementation may only support a
68 int (*store_to)(struct iio_buffer *buffer, const void *data);
69 int (*read)(struct iio_buffer *buffer, size_t n, char __user *buf);
70 size_t (*data_available)(struct iio_buffer *buffer);
71 int (*remove_from)(struct iio_buffer *buffer, void *data);
72 int (*write)(struct iio_buffer *buffer, size_t n, const char __user *buf);
73 size_t (*space_available)(struct iio_buffer *buffer);
75 int (*request_update)(struct iio_buffer *buffer);
77 int (*set_bytes_per_datum)(struct iio_buffer *buffer, size_t bpd);
78 int (*set_length)(struct iio_buffer *buffer, unsigned int length);
80 int (*enable)(struct iio_buffer *buffer, struct iio_dev *indio_dev);
81 int (*disable)(struct iio_buffer *buffer, struct iio_dev *indio_dev);
83 void (*release)(struct iio_buffer *buffer);
85 struct iio_dma_buffer_block * (*attach_dmabuf)(struct iio_buffer *buffer,
87 void (*detach_dmabuf)(struct iio_buffer *buffer,
89 int (*enqueue_dmabuf)(struct iio_buffer *buffer,
93 void (*lock_queue)(struct iio_buffer *buffer);
94 void (*unlock_queue)(struct iio_buffer *buffer);
101 * struct iio_buffer - general buffer structure
104 * those writing new buffer implementations.
107 /** @length: Number of datums in buffer. */
120 * @access: Buffer access functions associated with the
131 /** @pollq: Wait queue to allow for polling on the buffer. */
141 /* @buffer_attr_list: List of buffer attributes. */
145 * @buffer_group: Attributes of the new buffer group.
150 /* @attrs: Standard attributes of the buffer. */
153 /* @demux_bounce: Buffer for doing gather from incoming scan. */
162 /* @ref: Reference count of the buffer. */
173 * iio_update_buffers() - add or remove buffer from active list
174 * @indio_dev: device to add buffer to
175 * @insert_buffer: buffer to insert
185 * iio_buffer_init() - Initialize the buffer structure
186 * @buffer: buffer to be initialized
188 void iio_buffer_init(struct iio_buffer *buffer);
190 struct iio_buffer *iio_buffer_get(struct iio_buffer *buffer);
191 void iio_buffer_put(struct iio_buffer *buffer);
197 static inline void iio_buffer_get(struct iio_buffer *buffer) {} in iio_buffer_get() argument
198 static inline void iio_buffer_put(struct iio_buffer *buffer) {} in iio_buffer_put() argument