Lines Matching defs:buffer
10 #include <linux/iio/buffer.h>
17 struct iio_buffer buffer;
23 #define iio_to_kfifo(r) container_of(r, struct iio_kfifo, buffer)
50 ret = __iio_allocate_kfifo(buf, buf->buffer.bytes_per_datum,
51 buf->buffer.length);
132 static void iio_kfifo_buffer_release(struct iio_buffer *buffer)
134 struct iio_kfifo *kf = iio_to_kfifo(buffer);
212 iio_buffer_init(&kf->buffer);
213 kf->buffer.access = &kfifo_access_funcs;
214 kf->buffer.length = 2;
217 return &kf->buffer;
234 * @dev: Device to allocate kfifo buffer for
259 * devm_iio_kfifo_buffer_setup_ext - Allocate a kfifo buffer & attach it to an IIO device
260 * @dev: Device object to which to attach the life-time of this kfifo buffer
261 * @indio_dev: The device the buffer should be attached to
262 * @setup_ops: The setup_ops required to configure the HW part of the buffer (optional)
263 * @buffer_attrs: Extra sysfs buffer attributes for this IIO buffer
265 * This function allocates a kfifo buffer via devm_iio_kfifo_allocate() and
275 struct iio_buffer *buffer;
277 buffer = devm_iio_kfifo_allocate(dev);
278 if (!buffer)
284 buffer->attrs = buffer_attrs;
286 return iio_device_attach_buffer(indio_dev, buffer);