linux/drivers/iio/buffer
Alexandru Ardelean e36db6a069 iio: kfifo: add devm_iio_kfifo_buffer_setup() helper
This change adds the devm_iio_kfifo_buffer_setup() helper/short-hand,
which groups the simple routine of allocating a kfifo buffers via
devm_iio_kfifo_allocate() and calling iio_device_attach_buffer().

The mode_flags parameter is required, as the IIO kfifo supports 2 modes:
INDIO_BUFFER_SOFTWARE & INDIO_BUFFER_TRIGGERED.
The setup_ops parameter is optional.

This function will be a bit more useful when needing to define multiple
buffers per IIO device.

The naming for this function has been inspired from
iio_triggered_buffer_setup() since that one does a kfifo alloc + a pollfunc
alloc. So, this should have a more familiar ring to what it is.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210215104043.91251-3-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-03-11 20:47:01 +00:00
..
industrialio-buffer-cb.c iio: buffer: Return error if no callback is given 2020-12-03 19:32:40 +00:00
industrialio-buffer-dma.c iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes 2020-04-19 16:56:31 +01:00
industrialio-buffer-dmaengine.c iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs() 2020-11-21 14:52:57 +00:00
industrialio-hw-consumer.c iio: buffer: drop devm_iio_hw_consumer_free() API call 2020-04-19 16:56:37 +01:00
industrialio-triggered-buffer.c iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants 2020-11-21 14:53:09 +00:00
Kconfig iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol 2020-09-29 17:27:08 +01:00
kfifo_buf.c iio: kfifo: add devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
Makefile iio: Add hardware consumer buffer support 2018-01-10 10:30:05 +00:00