Skip to content

Commit

Permalink
iio: Add channel for UV index
Browse files Browse the repository at this point in the history
UV index indicating strength of sunburn-producing ultraviolet (UV) radiation

Signed-off-by: Peter Meerwald-Stadler <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
pmeerw authored and jic23 committed Apr 3, 2016
1 parent 2c5ff1f commit d409404
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-iio
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,15 @@ Description:
components or just infrared light, respectively. Modifier uv indicates
that measurements contain ultraviolet light components.

What: /sys/.../iio:deviceX/in_uvindex_input
KernelVersion: 4.6
Contact: [email protected]
Description:
UV light intensity index measuring the human skin's response to
different wavelength of sunlight weighted according to the
standardised CIE Erythemal Action Spectrum. UV index values range
from 0 (low) to >=11 (extreme).

What: /sys/.../iio:deviceX/in_intensity_red_integration_time
What: /sys/.../iio:deviceX/in_intensity_green_integration_time
What: /sys/.../iio:deviceX/in_intensity_blue_integration_time
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_CONCENTRATION] = "concentration",
[IIO_RESISTANCE] = "resistance",
[IIO_PH] = "ph",
[IIO_UVINDEX] = "uvindex",
};

static const char * const iio_modifier_names[] = {
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/iio/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum iio_chan_type {
IIO_CONCENTRATION,
IIO_RESISTANCE,
IIO_PH,
IIO_UVINDEX,
};

enum iio_modifier {
Expand Down
2 changes: 2 additions & 0 deletions tools/iio/iio_event_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_CONCENTRATION] = "concentration",
[IIO_RESISTANCE] = "resistance",
[IIO_PH] = "ph",
[IIO_UVINDEX] = "uvindex",
};

static const char * const iio_ev_type_text[] = {
Expand Down Expand Up @@ -147,6 +148,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_CONCENTRATION:
case IIO_RESISTANCE:
case IIO_PH:
case IIO_UVINDEX:
break;
default:
return false;
Expand Down

0 comments on commit d409404

Please sign in to comment.