iio: Add modifier for DUV light
authorMaxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Thu, 19 Jul 2018 20:26:24 +0000 (16:26 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Jul 2018 18:18:10 +0000 (19:18 +0100)
Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-core.c
include/uapi/linux/iio/types.h
tools/iio/iio_event_monitor.c

index c9cfa833cf472da4c8c12f791a0467c13b0ac5b4..a5b4f223641d909cac3bd09777a9502840530f13 100644 (file)
@@ -1307,13 +1307,16 @@ 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
+What:          /sys/.../iio:deviceX/in_intensityY_duv_raw
 KernelVersion: 3.4
 Contact:       linux-iio@vger.kernel.org
 Description:
                Unit-less light intensity. Modifiers both and ir indicate
                that measurements contain visible and infrared light
-               components or just infrared light, respectively. Modifier uv indicates
-               that measurements contain ultraviolet light components.
+               components or just infrared light, respectively. Modifier
+               uv indicates that measurements contain ultraviolet light
+               components. Modifier duv indicates that measurements
+               contain deep ultraviolet light components.
 
 What:          /sys/.../iio:deviceX/in_uvindex_input
 KernelVersion: 4.6
index a16ad5a4ab0cbe4637955bc19267fbafd35c1950..a062cfddc5af76da66a14bcf4178ee8487925099 100644 (file)
@@ -110,6 +110,7 @@ static const char * const iio_modifier_names[] = {
        [IIO_MOD_LIGHT_GREEN] = "green",
        [IIO_MOD_LIGHT_BLUE] = "blue",
        [IIO_MOD_LIGHT_UV] = "uv",
+       [IIO_MOD_LIGHT_DUV] = "duv",
        [IIO_MOD_QUATERNION] = "quaternion",
        [IIO_MOD_TEMP_AMBIENT] = "ambient",
        [IIO_MOD_TEMP_OBJECT] = "object",
index e4df3cc268db1fc7ea2a83db64d2c5070d98c349..92baabc103acbd22f7ca1487687401bf8ee7d5bd 100644 (file)
@@ -86,6 +86,7 @@ enum iio_modifier {
        IIO_MOD_CO2,
        IIO_MOD_VOC,
        IIO_MOD_LIGHT_UV,
+       IIO_MOD_LIGHT_DUV,
 };
 
 enum iio_event_type {
index f478f5558720c75588c4786b239084b798ea5133..ac2de6b7e89f5e07801e8c8198c9228404a56bfc 100644 (file)
@@ -98,6 +98,7 @@ static const char * const iio_modifier_names[] = {
        [IIO_MOD_LIGHT_GREEN] = "green",
        [IIO_MOD_LIGHT_BLUE] = "blue",
        [IIO_MOD_LIGHT_UV] = "uv",
+       [IIO_MOD_LIGHT_DUV] = "duv",
        [IIO_MOD_QUATERNION] = "quaternion",
        [IIO_MOD_TEMP_AMBIENT] = "ambient",
        [IIO_MOD_TEMP_OBJECT] = "object",
@@ -182,6 +183,7 @@ static bool event_is_known(struct iio_event_data *event)
        case IIO_MOD_LIGHT_GREEN:
        case IIO_MOD_LIGHT_BLUE:
        case IIO_MOD_LIGHT_UV:
+       case IIO_MOD_LIGHT_DUV:
        case IIO_MOD_QUATERNION:
        case IIO_MOD_TEMP_AMBIENT:
        case IIO_MOD_TEMP_OBJECT: