Lines Matching defs:buffer
11 #include <linux/iio/buffer.h>
18 * iio_triggered_buffer_setup_ext() - Setup triggered buffer and pollfunc
26 * @buffer_attrs: Extra sysfs buffer attributes for this IIO buffer
29 * when setting up a triggered buffer. It will allocate the buffer and the
46 struct iio_buffer *buffer;
50 * iio_triggered_buffer_cleanup() assumes that the buffer allocated here
51 * is assigned to indio_dev->buffer but this is only the case if this
53 * indio_dev->buffer is already set then we can't proceed otherwise the
54 * cleanup function will try to free a buffer that was not allocated here.
56 if (indio_dev->buffer)
59 buffer = iio_kfifo_allocate();
60 if (!buffer) {
77 /* Ring buffer functions - here trigger setup related */
83 buffer->direction = direction;
84 buffer->attrs = buffer_attrs;
86 ret = iio_device_attach_buffer(indio_dev, buffer);
95 iio_kfifo_free(buffer);
108 iio_kfifo_free(indio_dev->buffer);