Skip to content

Commit

Permalink
iio: Add modifier for UV light
Browse files Browse the repository at this point in the history
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 eaa3476 commit 2c5ff1f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/ABI/testing/sysfs-bus-iio
Original file line number Diff line number Diff line change
Expand Up @@ -1255,12 +1255,14 @@ Description:
What: /sys/.../iio:deviceX/in_intensityY_raw
What: /sys/.../iio:deviceX/in_intensityY_ir_raw
What: /sys/.../iio:deviceX/in_intensityY_both_raw
What: /sys/.../iio:deviceX/in_intensityY_uv_raw
KernelVersion: 3.4
Contact: [email protected]
Description:
Unit-less light intensity. Modifiers both and ir indicate
that measurements contains visible and infrared light
components or just infrared light, respectively.
components or just infrared light, respectively. Modifier uv indicates
that measurements contain ultraviolet light components.

What: /sys/.../iio:deviceX/in_intensity_red_integration_time
What: /sys/.../iio:deviceX/in_intensity_green_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 @@ -101,6 +101,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_LIGHT_RED] = "red",
[IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue",
[IIO_MOD_LIGHT_UV] = "uv",
[IIO_MOD_QUATERNION] = "quaternion",
[IIO_MOD_TEMP_AMBIENT] = "ambient",
[IIO_MOD_TEMP_OBJECT] = "object",
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 @@ -77,6 +77,7 @@ enum iio_modifier {
IIO_MOD_Q,
IIO_MOD_CO2,
IIO_MOD_VOC,
IIO_MOD_LIGHT_UV,
};

enum iio_event_type {
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 @@ -93,6 +93,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_LIGHT_RED] = "red",
[IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue",
[IIO_MOD_LIGHT_UV] = "uv",
[IIO_MOD_QUATERNION] = "quaternion",
[IIO_MOD_TEMP_AMBIENT] = "ambient",
[IIO_MOD_TEMP_OBJECT] = "object",
Expand Down Expand Up @@ -172,6 +173,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_MOD_LIGHT_RED:
case IIO_MOD_LIGHT_GREEN:
case IIO_MOD_LIGHT_BLUE:
case IIO_MOD_LIGHT_UV:
case IIO_MOD_QUATERNION:
case IIO_MOD_TEMP_AMBIENT:
case IIO_MOD_TEMP_OBJECT:
Expand Down

0 comments on commit 2c5ff1f

Please sign in to comment.