1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* industrial I/O data types needed both in and out of kernel
3  *
4  * Copyright (c) 2008 Jonathan Cameron
5  */
6 
7 #ifndef _IIO_TYPES_H_
8 #define _IIO_TYPES_H_
9 
10 #include <uapi/linux/iio/types.h>
11 
12 enum iio_event_info {
13 	IIO_EV_INFO_ENABLE,
14 	IIO_EV_INFO_VALUE,
15 	IIO_EV_INFO_HYSTERESIS,
16 	IIO_EV_INFO_PERIOD,
17 	IIO_EV_INFO_HIGH_PASS_FILTER_3DB,
18 	IIO_EV_INFO_LOW_PASS_FILTER_3DB,
19 	IIO_EV_INFO_TIMEOUT,
20 	IIO_EV_INFO_RESET_TIMEOUT,
21 	IIO_EV_INFO_TAP2_MIN_DELAY,
22 	IIO_EV_INFO_RUNNING_PERIOD,
23 	IIO_EV_INFO_RUNNING_COUNT,
24 };
25 
26 #define IIO_VAL_INT 1
27 #define IIO_VAL_INT_PLUS_MICRO 2
28 #define IIO_VAL_INT_PLUS_NANO 3
29 #define IIO_VAL_INT_PLUS_MICRO_DB 4
30 #define IIO_VAL_INT_MULTIPLE 5
31 #define IIO_VAL_INT_64 6 /* 64-bit data, val is lower 32 bits */
32 #define IIO_VAL_FRACTIONAL 10
33 #define IIO_VAL_FRACTIONAL_LOG2 11
34 #define IIO_VAL_CHAR 12
35 
36 enum iio_available_type {
37 	IIO_AVAIL_LIST,
38 	IIO_AVAIL_RANGE,
39 };
40 
41 enum iio_chan_info_enum {
42 	IIO_CHAN_INFO_RAW = 0,
43 	IIO_CHAN_INFO_PROCESSED,
44 	IIO_CHAN_INFO_SCALE,
45 	IIO_CHAN_INFO_OFFSET,
46 	IIO_CHAN_INFO_CALIBSCALE,
47 	IIO_CHAN_INFO_CALIBBIAS,
48 	IIO_CHAN_INFO_PEAK,
49 	IIO_CHAN_INFO_PEAK_SCALE,
50 	IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW,
51 	IIO_CHAN_INFO_AVERAGE_RAW,
52 	IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
53 	IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY,
54 	IIO_CHAN_INFO_SAMP_FREQ,
55 	IIO_CHAN_INFO_FREQUENCY,
56 	IIO_CHAN_INFO_PHASE,
57 	IIO_CHAN_INFO_HARDWAREGAIN,
58 	IIO_CHAN_INFO_HYSTERESIS,
59 	IIO_CHAN_INFO_HYSTERESIS_RELATIVE,
60 	IIO_CHAN_INFO_INT_TIME,
61 	IIO_CHAN_INFO_ENABLE,
62 	IIO_CHAN_INFO_CALIBHEIGHT,
63 	IIO_CHAN_INFO_CALIBWEIGHT,
64 	IIO_CHAN_INFO_DEBOUNCE_COUNT,
65 	IIO_CHAN_INFO_DEBOUNCE_TIME,
66 	IIO_CHAN_INFO_CALIBEMISSIVITY,
67 	IIO_CHAN_INFO_OVERSAMPLING_RATIO,
68 	IIO_CHAN_INFO_THERMOCOUPLE_TYPE,
69 	IIO_CHAN_INFO_CALIBAMBIENT,
70 	IIO_CHAN_INFO_ZEROPOINT,
71 	IIO_CHAN_INFO_TROUGH,
72 };
73 
74 #endif /* _IIO_TYPES_H_ */
75