.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* Industrialio event test code. |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (c) 2011-2012 Lars-Peter Clausen <lars@metafoo.de> |
---|
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 | 5 | * |
---|
9 | 6 | * This program is primarily intended as an example application. |
---|
10 | 7 | * Reads the current buffer setup from sysfs and starts a short capture |
---|
.. | .. |
---|
60 | 57 | [IIO_GRAVITY] = "gravity", |
---|
61 | 58 | [IIO_POSITIONRELATIVE] = "positionrelative", |
---|
62 | 59 | [IIO_PHASE] = "phase", |
---|
| 60 | + [IIO_MASSCONCENTRATION] = "massconcentration", |
---|
| 61 | +#ifdef CONFIG_NO_GKI |
---|
| 62 | + [IIO_SIGN_MOTION] = "signmotion", |
---|
| 63 | + [IIO_STEP_DETECTOR] = "stepdetector", |
---|
| 64 | + [IIO_STEP_COUNTER] = "stepcounter", |
---|
| 65 | + [IIO_TILT] = "tilt", |
---|
| 66 | + [IIO_TAP] = "tap", |
---|
| 67 | + [IIO_TAP_TAP] = "taptap", |
---|
| 68 | + [IIO_WRIST_TILT_GESTURE] = "wristtiltgesture", |
---|
| 69 | + [IIO_GESTURE] = "gesture", |
---|
| 70 | +#endif |
---|
63 | 71 | }; |
---|
64 | 72 | |
---|
65 | 73 | static const char * const iio_ev_type_text[] = { |
---|
.. | .. |
---|
69 | 77 | [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", |
---|
70 | 78 | [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", |
---|
71 | 79 | [IIO_EV_TYPE_CHANGE] = "change", |
---|
| 80 | +#ifdef CONFIG_NO_GKI |
---|
| 81 | + [IIO_EV_TYPE_FIFO_FLUSH] = "fifo_flush", |
---|
| 82 | +#endif |
---|
72 | 83 | }; |
---|
73 | 84 | |
---|
74 | 85 | static const char * const iio_ev_dir_text[] = { |
---|
75 | 86 | [IIO_EV_DIR_EITHER] = "either", |
---|
76 | 87 | [IIO_EV_DIR_RISING] = "rising", |
---|
77 | | - [IIO_EV_DIR_FALLING] = "falling" |
---|
| 88 | + [IIO_EV_DIR_FALLING] = "falling", |
---|
| 89 | +#ifdef CONFIG_NO_GKI |
---|
| 90 | + [IIO_EV_DIR_FIFO_EMPTY] = "empty", |
---|
| 91 | + [IIO_EV_DIR_FIFO_DATA] = "data", |
---|
| 92 | +#endif |
---|
78 | 93 | }; |
---|
79 | 94 | |
---|
80 | 95 | static const char * const iio_modifier_names[] = { |
---|
.. | .. |
---|
114 | 129 | [IIO_MOD_I] = "i", |
---|
115 | 130 | [IIO_MOD_Q] = "q", |
---|
116 | 131 | [IIO_MOD_CO2] = "co2", |
---|
| 132 | + [IIO_MOD_ETHANOL] = "ethanol", |
---|
| 133 | + [IIO_MOD_H2] = "h2", |
---|
117 | 134 | [IIO_MOD_VOC] = "voc", |
---|
| 135 | + [IIO_MOD_PM1] = "pm1", |
---|
| 136 | + [IIO_MOD_PM2P5] = "pm2p5", |
---|
| 137 | + [IIO_MOD_PM4] = "pm4", |
---|
| 138 | + [IIO_MOD_PM10] = "pm10", |
---|
| 139 | + [IIO_MOD_O2] = "o2", |
---|
118 | 140 | }; |
---|
119 | 141 | |
---|
120 | 142 | static bool event_is_known(struct iio_event_data *event) |
---|
.. | .. |
---|
156 | 178 | case IIO_GRAVITY: |
---|
157 | 179 | case IIO_POSITIONRELATIVE: |
---|
158 | 180 | case IIO_PHASE: |
---|
| 181 | + case IIO_MASSCONCENTRATION: |
---|
159 | 182 | break; |
---|
160 | 183 | default: |
---|
161 | 184 | return false; |
---|
.. | .. |
---|
199 | 222 | case IIO_MOD_I: |
---|
200 | 223 | case IIO_MOD_Q: |
---|
201 | 224 | case IIO_MOD_CO2: |
---|
| 225 | + case IIO_MOD_ETHANOL: |
---|
| 226 | + case IIO_MOD_H2: |
---|
202 | 227 | case IIO_MOD_VOC: |
---|
| 228 | + case IIO_MOD_PM1: |
---|
| 229 | + case IIO_MOD_PM2P5: |
---|
| 230 | + case IIO_MOD_PM4: |
---|
| 231 | + case IIO_MOD_PM10: |
---|
| 232 | + case IIO_MOD_O2: |
---|
203 | 233 | break; |
---|
204 | 234 | default: |
---|
205 | 235 | return false; |
---|