Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / include / linux / iio / types.h
1 /* industrial I/O data types needed both in and out of kernel
2  *
3  * Copyright (c) 2008 Jonathan Cameron
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published by
7  * the Free Software Foundation.
8  */
9
10 #ifndef _IIO_TYPES_H_
11 #define _IIO_TYPES_H_
12
13 enum iio_chan_type {
14         IIO_VOLTAGE,
15         IIO_CURRENT,
16         IIO_POWER,
17         IIO_ACCEL,
18         IIO_ANGL_VEL,
19         IIO_MAGN,
20         IIO_LIGHT,
21         IIO_INTENSITY,
22         IIO_PROXIMITY,
23         IIO_TEMP,
24         IIO_INCLI,
25         IIO_ROT,
26         IIO_ANGL,
27         IIO_TIMESTAMP,
28         IIO_CAPACITANCE,
29         IIO_ALTVOLTAGE,
30         IIO_CCT,
31         IIO_PRESSURE,
32 };
33
34 enum iio_modifier {
35         IIO_NO_MOD,
36         IIO_MOD_X,
37         IIO_MOD_Y,
38         IIO_MOD_Z,
39         IIO_MOD_X_AND_Y,
40         IIO_MOD_X_AND_Z,
41         IIO_MOD_Y_AND_Z,
42         IIO_MOD_X_AND_Y_AND_Z,
43         IIO_MOD_X_OR_Y,
44         IIO_MOD_X_OR_Z,
45         IIO_MOD_Y_OR_Z,
46         IIO_MOD_X_OR_Y_OR_Z,
47         IIO_MOD_LIGHT_BOTH,
48         IIO_MOD_LIGHT_IR,
49         IIO_MOD_ROOT_SUM_SQUARED_X_Y,
50         IIO_MOD_SUM_SQUARED_X_Y_Z,
51         IIO_MOD_LIGHT_CLEAR,
52         IIO_MOD_LIGHT_RED,
53         IIO_MOD_LIGHT_GREEN,
54         IIO_MOD_LIGHT_BLUE,
55 };
56
57 enum iio_event_type {
58         IIO_EV_TYPE_THRESH,
59         IIO_EV_TYPE_MAG,
60         IIO_EV_TYPE_ROC,
61         IIO_EV_TYPE_THRESH_ADAPTIVE,
62         IIO_EV_TYPE_MAG_ADAPTIVE,
63 };
64
65 enum iio_event_info {
66         IIO_EV_INFO_ENABLE,
67         IIO_EV_INFO_VALUE,
68         IIO_EV_INFO_HYSTERESIS,
69 };
70
71 enum iio_event_direction {
72         IIO_EV_DIR_EITHER,
73         IIO_EV_DIR_RISING,
74         IIO_EV_DIR_FALLING,
75 };
76
77 #define IIO_VAL_INT 1
78 #define IIO_VAL_INT_PLUS_MICRO 2
79 #define IIO_VAL_INT_PLUS_NANO 3
80 #define IIO_VAL_INT_PLUS_MICRO_DB 4
81 #define IIO_VAL_FRACTIONAL 10
82 #define IIO_VAL_FRACTIONAL_LOG2 11
83
84 #endif /* _IIO_TYPES_H_ */