Skip to content

Commit d409404

Browse files
pmeerwjic23
authored andcommitted
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>
1 parent 2c5ff1f commit d409404

4 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎Documentation/ABI/testing/sysfs-bus-iio‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,15 @@ Description:
12641264
components or just infrared light, respectively. Modifier uv indicates
12651265
that measurements contain ultraviolet light components.
12661266

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+
12671276
What: /sys/.../iio:deviceX/in_intensity_red_integration_time
12681277
What: /sys/.../iio:deviceX/in_intensity_green_integration_time
12691278
What: /sys/.../iio:deviceX/in_intensity_blue_integration_time

‎drivers/iio/industrialio-core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ static const char * const iio_chan_type_name_spec[] = {
7979
[IIO_CONCENTRATION] = "concentration",
8080
[IIO_RESISTANCE] = "resistance",
8181
[IIO_PH] = "ph",
82+
[IIO_UVINDEX] = "uvindex",
8283
};
8384

8485
static const char * const iio_modifier_names[] = {

‎include/uapi/linux/iio/types.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum iio_chan_type {
3838
IIO_CONCENTRATION,
3939
IIO_RESISTANCE,
4040
IIO_PH,
41+
IIO_UVINDEX,
4142
};
4243

4344
enum iio_modifier {

‎tools/iio/iio_event_monitor.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static const char * const iio_chan_type_name_spec[] = {
5656
[IIO_CONCENTRATION] = "concentration",
5757
[IIO_RESISTANCE] = "resistance",
5858
[IIO_PH] = "ph",
59+
[IIO_UVINDEX] = "uvindex",
5960
};
6061

6162
static const char * const iio_ev_type_text[] = {
@@ -147,6 +148,7 @@ static bool event_is_known(struct iio_event_data *event)
147148
case IIO_CONCENTRATION:
148149
case IIO_RESISTANCE:
149150
case IIO_PH:
151+
case IIO_UVINDEX:
150152
break;
151153
default:
152154
return false;

0 commit comments

Comments
 (0)