aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/triggered_buffer.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-06-18 12:33:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-18 20:26:09 -0400
commit23f2d735a932c7833d2d00da5e3ecdf4a6836210 (patch)
tree2e0d4da782473ccd226fc6f4221b2c0bc92ba411 /include/linux/iio/triggered_buffer.h
parentf5b81ddd12da71bd00b2963203c23ff929e0c182 (diff)
iio: Add helper function for initializing triggered buffers
Add a helper function for executing the common tasks which are usually involved in setting up a simple software ringbuffer. It will allocate the buffer, allocate the pollfunc and register the buffer. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/iio/triggered_buffer.h')
-rw-r--r--include/linux/iio/triggered_buffer.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/iio/triggered_buffer.h b/include/linux/iio/triggered_buffer.h
new file mode 100644
index 000000000000..c378ebec605e
--- /dev/null
+++ b/include/linux/iio/triggered_buffer.h
@@ -0,0 +1,15 @@
1#ifndef _LINUX_IIO_TRIGGERED_BUFFER_H_
2#define _LINUX_IIO_TRIGGERED_BUFFER_H_
3
4#include <linux/interrupt.h>
5
6struct iio_dev;
7struct iio_buffer_setup_ops;
8
9int iio_triggered_buffer_setup(struct iio_dev *indio_dev,
10 irqreturn_t (*pollfunc_bh)(int irq, void *p),
11 irqreturn_t (*pollfunc_th)(int irq, void *p),
12 const struct iio_buffer_setup_ops *setup_ops);
13void iio_triggered_buffer_cleanup(struct iio_dev *indio_dev);
14
15#endif