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