summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api/driver-model
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2021-02-15 12:40:21 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-11 20:47:01 +0000
commite36db6a06937c6fce3291f0c362d4f757b8ec703 (patch)
tree3152bc798187beffb0342471a11ef8c32f43f35a /Documentation/driver-api/driver-model
parent0bf49ffbfe949df21e95b8f95b5f308db379ac74 (diff)
downloadlinux-e36db6a06937c6fce3291f0c362d4f757b8ec703.tar.gz
linux-e36db6a06937c6fce3291f0c362d4f757b8ec703.tar.bz2
linux-e36db6a06937c6fce3291f0c362d4f757b8ec703.zip
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>
Diffstat (limited to 'Documentation/driver-api/driver-model')
-rw-r--r--Documentation/driver-api/driver-model/devres.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
index cd8b6e657b94..562f5722281e 100644
--- a/Documentation/driver-api/driver-model/devres.rst
+++ b/Documentation/driver-api/driver-model/devres.rst
@@ -286,6 +286,7 @@ IIO
devm_iio_device_alloc()
devm_iio_device_register()
devm_iio_kfifo_allocate()
+ devm_iio_kfifo_buffer_setup()
devm_iio_triggered_buffer_setup()
devm_iio_trigger_alloc()
devm_iio_trigger_register()