1
2
3
4
5
6
7 #ifndef __LINUX_IIO_TRIGGER_CONSUMER_H__
8 #define __LINUX_IIO_TRIGGER_CONSUMER_H__
9
10 #include <linux/interrupt.h>
11 #include <linux/types.h>
12
13 struct iio_dev;
14 struct iio_trigger;
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 struct iio_poll_func {
31 struct iio_dev *indio_dev;
32 irqreturn_t (*h)(int irq, void *p);
33 irqreturn_t (*thread)(int irq, void *p);
34 int type;
35 char *name;
36 int irq;
37 s64 timestamp;
38 };
39
40
41 struct iio_poll_func
42 *iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
43 irqreturn_t (*thread)(int irq, void *p),
44 int type,
45 struct iio_dev *indio_dev,
46 const char *fmt,
47 ...);
48 void iio_dealloc_pollfunc(struct iio_poll_func *pf);
49 irqreturn_t iio_pollfunc_store_time(int irq, void *p);
50
51 void iio_trigger_notify_done(struct iio_trigger *trig);
52
53
54
55
56
57 int iio_triggered_buffer_postenable(struct iio_dev *indio_dev);
58 int iio_triggered_buffer_predisable(struct iio_dev *indio_dev);
59
60 #endif