diff options
author | Peter Meerwald-Stadler <pmeerw@pmeerw.net> | 2016-03-20 11:20:22 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-03 06:14:00 -0400 |
commit | 2c5ff1f9a6240d7d2d0928021cb76e421d6aacaf (patch) | |
tree | 56ae9ee88bef295ad91810dc5d7ee6a765a9c240 | |
parent | eaa3476a7ee27c9927531781c8b25365d77e3030 (diff) |
iio: Add modifier for UV light
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-iio | 4 | ||||
-rw-r--r-- | drivers/iio/industrialio-core.c | 1 | ||||
-rw-r--r-- | include/uapi/linux/iio/types.h | 1 | ||||
-rw-r--r-- | tools/iio/iio_event_monitor.c | 2 |
4 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 17a9210fa6b5..6fb9180e7661 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -1255,12 +1255,14 @@ Description: | |||
1255 | What: /sys/.../iio:deviceX/in_intensityY_raw | 1255 | What: /sys/.../iio:deviceX/in_intensityY_raw |
1256 | What: /sys/.../iio:deviceX/in_intensityY_ir_raw | 1256 | What: /sys/.../iio:deviceX/in_intensityY_ir_raw |
1257 | What: /sys/.../iio:deviceX/in_intensityY_both_raw | 1257 | What: /sys/.../iio:deviceX/in_intensityY_both_raw |
1258 | What: /sys/.../iio:deviceX/in_intensityY_uv_raw | ||
1258 | KernelVersion: 3.4 | 1259 | KernelVersion: 3.4 |
1259 | Contact: linux-iio@vger.kernel.org | 1260 | Contact: linux-iio@vger.kernel.org |
1260 | Description: | 1261 | Description: |
1261 | Unit-less light intensity. Modifiers both and ir indicate | 1262 | Unit-less light intensity. Modifiers both and ir indicate |
1262 | that measurements contains visible and infrared light | 1263 | that measurements contains visible and infrared light |
1263 | components or just infrared light, respectively. | 1264 | components or just infrared light, respectively. Modifier uv indicates |
1265 | that measurements contain ultraviolet light components. | ||
1264 | 1266 | ||
1265 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time | 1267 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time |
1266 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time | 1268 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time |
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 2e768bc99f05..88353ae0ec07 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c | |||
@@ -101,6 +101,7 @@ static const char * const iio_modifier_names[] = { | |||
101 | [IIO_MOD_LIGHT_RED] = "red", | 101 | [IIO_MOD_LIGHT_RED] = "red", |
102 | [IIO_MOD_LIGHT_GREEN] = "green", | 102 | [IIO_MOD_LIGHT_GREEN] = "green", |
103 | [IIO_MOD_LIGHT_BLUE] = "blue", | 103 | [IIO_MOD_LIGHT_BLUE] = "blue", |
104 | [IIO_MOD_LIGHT_UV] = "uv", | ||
104 | [IIO_MOD_QUATERNION] = "quaternion", | 105 | [IIO_MOD_QUATERNION] = "quaternion", |
105 | [IIO_MOD_TEMP_AMBIENT] = "ambient", | 106 | [IIO_MOD_TEMP_AMBIENT] = "ambient", |
106 | [IIO_MOD_TEMP_OBJECT] = "object", | 107 | [IIO_MOD_TEMP_OBJECT] = "object", |
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index c077617f3304..9337eceb9f9d 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h | |||
@@ -77,6 +77,7 @@ enum iio_modifier { | |||
77 | IIO_MOD_Q, | 77 | IIO_MOD_Q, |
78 | IIO_MOD_CO2, | 78 | IIO_MOD_CO2, |
79 | IIO_MOD_VOC, | 79 | IIO_MOD_VOC, |
80 | IIO_MOD_LIGHT_UV, | ||
80 | }; | 81 | }; |
81 | 82 | ||
82 | enum iio_event_type { | 83 | enum iio_event_type { |
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 90980f586f7a..8d7d9797480b 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c | |||
@@ -93,6 +93,7 @@ static const char * const iio_modifier_names[] = { | |||
93 | [IIO_MOD_LIGHT_RED] = "red", | 93 | [IIO_MOD_LIGHT_RED] = "red", |
94 | [IIO_MOD_LIGHT_GREEN] = "green", | 94 | [IIO_MOD_LIGHT_GREEN] = "green", |
95 | [IIO_MOD_LIGHT_BLUE] = "blue", | 95 | [IIO_MOD_LIGHT_BLUE] = "blue", |
96 | [IIO_MOD_LIGHT_UV] = "uv", | ||
96 | [IIO_MOD_QUATERNION] = "quaternion", | 97 | [IIO_MOD_QUATERNION] = "quaternion", |
97 | [IIO_MOD_TEMP_AMBIENT] = "ambient", | 98 | [IIO_MOD_TEMP_AMBIENT] = "ambient", |
98 | [IIO_MOD_TEMP_OBJECT] = "object", | 99 | [IIO_MOD_TEMP_OBJECT] = "object", |
@@ -172,6 +173,7 @@ static bool event_is_known(struct iio_event_data *event) | |||
172 | case IIO_MOD_LIGHT_RED: | 173 | case IIO_MOD_LIGHT_RED: |
173 | case IIO_MOD_LIGHT_GREEN: | 174 | case IIO_MOD_LIGHT_GREEN: |
174 | case IIO_MOD_LIGHT_BLUE: | 175 | case IIO_MOD_LIGHT_BLUE: |
176 | case IIO_MOD_LIGHT_UV: | ||
175 | case IIO_MOD_QUATERNION: | 177 | case IIO_MOD_QUATERNION: |
176 | case IIO_MOD_TEMP_AMBIENT: | 178 | case IIO_MOD_TEMP_AMBIENT: |
177 | case IIO_MOD_TEMP_OBJECT: | 179 | case IIO_MOD_TEMP_OBJECT: |