diff options
author | Peter Meerwald-Stadler <pmeerw@pmeerw.net> | 2016-03-20 11:20:23 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-03 06:14:01 -0400 |
commit | d409404cf6e201c2980c7148484c350f33a7912e (patch) | |
tree | 97d2af968afc1cba701df20eade71fc6409f5a6a | |
parent | 2c5ff1f9a6240d7d2d0928021cb76e421d6aacaf (diff) |
iio: Add channel for UV index
UV index indicating strength of sunburn-producing ultraviolet (UV) radiation
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 | 9 | ||||
-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, 13 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 6fb9180e7661..f155eff910f9 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -1264,6 +1264,15 @@ Description: | |||
1264 | components or just infrared light, respectively. Modifier uv indicates | 1264 | components or just infrared light, respectively. Modifier uv indicates |
1265 | that measurements contain ultraviolet light components. | 1265 | that measurements contain ultraviolet light components. |
1266 | 1266 | ||
1267 | What: /sys/.../iio:deviceX/in_uvindex_input | ||
1268 | KernelVersion: 4.6 | ||
1269 | Contact: linux-iio@vger.kernel.org | ||
1270 | Description: | ||
1271 | UV light intensity index measuring the human skin's response to | ||
1272 | different wavelength of sunlight weighted according to the | ||
1273 | standardised CIE Erythemal Action Spectrum. UV index values range | ||
1274 | from 0 (low) to >=11 (extreme). | ||
1275 | |||
1267 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time | 1276 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time |
1268 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time | 1277 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time |
1269 | What: /sys/.../iio:deviceX/in_intensity_blue_integration_time | 1278 | What: /sys/.../iio:deviceX/in_intensity_blue_integration_time |
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 88353ae0ec07..190a5939fd8c 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c | |||
@@ -79,6 +79,7 @@ static const char * const iio_chan_type_name_spec[] = { | |||
79 | [IIO_CONCENTRATION] = "concentration", | 79 | [IIO_CONCENTRATION] = "concentration", |
80 | [IIO_RESISTANCE] = "resistance", | 80 | [IIO_RESISTANCE] = "resistance", |
81 | [IIO_PH] = "ph", | 81 | [IIO_PH] = "ph", |
82 | [IIO_UVINDEX] = "uvindex", | ||
82 | }; | 83 | }; |
83 | 84 | ||
84 | static const char * const iio_modifier_names[] = { | 85 | static const char * const iio_modifier_names[] = { |
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 9337eceb9f9d..b0916fc72cce 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h | |||
@@ -38,6 +38,7 @@ enum iio_chan_type { | |||
38 | IIO_CONCENTRATION, | 38 | IIO_CONCENTRATION, |
39 | IIO_RESISTANCE, | 39 | IIO_RESISTANCE, |
40 | IIO_PH, | 40 | IIO_PH, |
41 | IIO_UVINDEX, | ||
41 | }; | 42 | }; |
42 | 43 | ||
43 | enum iio_modifier { | 44 | enum iio_modifier { |
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 8d7d9797480b..d9b7e0f306c6 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c | |||
@@ -56,6 +56,7 @@ static const char * const iio_chan_type_name_spec[] = { | |||
56 | [IIO_CONCENTRATION] = "concentration", | 56 | [IIO_CONCENTRATION] = "concentration", |
57 | [IIO_RESISTANCE] = "resistance", | 57 | [IIO_RESISTANCE] = "resistance", |
58 | [IIO_PH] = "ph", | 58 | [IIO_PH] = "ph", |
59 | [IIO_UVINDEX] = "uvindex", | ||
59 | }; | 60 | }; |
60 | 61 | ||
61 | static const char * const iio_ev_type_text[] = { | 62 | static const char * const iio_ev_type_text[] = { |
@@ -147,6 +148,7 @@ static bool event_is_known(struct iio_event_data *event) | |||
147 | case IIO_CONCENTRATION: | 148 | case IIO_CONCENTRATION: |
148 | case IIO_RESISTANCE: | 149 | case IIO_RESISTANCE: |
149 | case IIO_PH: | 150 | case IIO_PH: |
151 | case IIO_UVINDEX: | ||
150 | break; | 152 | break; |
151 | default: | 153 | default: |
152 | return false; | 154 | return false; |