iio: Add modifier for UV light
authorPeter Meerwald-Stadler <pmeerw@pmeerw.net>
Sun, 20 Mar 2016 15:20:22 +0000 (16:20 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Apr 2016 10:14:00 +0000 (11:14 +0100)
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-core.c
include/uapi/linux/iio/types.h
tools/iio/iio_event_monitor.c

index 17a9210fa6b5c2b21da917b009e59125dc6c6a3d..6fb9180e7661e356eaacc8e458dacbb6b2f204d7 100644 (file)
@@ -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:       linux-iio@vger.kernel.org
 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
index 2e768bc99f053907d09735c0d1f1d7e09aa25240..88353ae0ec07c3ec621eca31746444988e8d83cb 100644 (file)
@@ -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",
index c077617f3304355d2d465e3760a5f46f5de2bbb9..9337eceb9f9d50361b561f71960117149b1c2879 100644 (file)
@@ -77,6 +77,7 @@ enum iio_modifier {
        IIO_MOD_Q,
        IIO_MOD_CO2,
        IIO_MOD_VOC,
+       IIO_MOD_LIGHT_UV,
 };
 
 enum iio_event_type {
index 90980f586f7a80ac9ea151881f7478610ee60970..8d7d9797480bf22784c28b7c296827b3bf98871e 100644 (file)
@@ -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",
@@ -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: