iio: add modifiers for A and B ultraviolet light
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Mon, 27 Nov 2023 17:34:28 +0000 (18:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 4 Dec 2023 13:57:24 +0000 (13:57 +0000)
Currently there are only two modifiers for ultraviolet light: a generic
one for any ultraviolet light (IIO_MOD_LIGHT_UV) and one for deep
ultraviolet (IIO_MOD_LIGHT_DUV), which is also referred as ultraviolet
C (UV-C) band and covers short-wave ultraviolet.

There are still no modifiers for the long-wave and medium-wave
ultraviolet bands. These two bands are the main components used to
obtain the UV index on the Earth's surface.

Add modifiers for the ultraviolet A (UV-A) and ultraviolet B (UV-B)
bands.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20231110-veml6075-v3-1-6ee46775b422@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 0eadc08c3a139dfd3b8c68dc5993d03fdded1fcc..0d3ec5fc45f2fd2423713f9a09dad9d3b8df382c 100644 (file)
@@ -1574,6 +1574,8 @@ 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_uva_raw
+What:          /sys/.../iio:deviceX/in_intensityY_uvb_raw
 What:          /sys/.../iio:deviceX/in_intensityY_duv_raw
 KernelVersion: 3.4
 Contact:       linux-iio@vger.kernel.org
@@ -1582,8 +1584,9 @@ Description:
                that measurements contain visible and infrared light
                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.
+               components. Modifiers uva, uvb and duv indicate that
+               measurements contain A, B or deep (C) ultraviolet light
+               components respectively.
 
 What:          /sys/.../iio:deviceX/in_uvindex_input
 KernelVersion: 4.6
index 34e1f8d0071cbca3858776424326461ef3271a25..f6a123d397db517abdad80db044b151c31be59a0 100644 (file)
@@ -117,6 +117,8 @@ 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_UVA] = "uva",
+       [IIO_MOD_LIGHT_UVB] = "uvb",
        [IIO_MOD_LIGHT_DUV] = "duv",
        [IIO_MOD_QUATERNION] = "quaternion",
        [IIO_MOD_TEMP_AMBIENT] = "ambient",
index 9c2ffdcd66230055eda531a6b25cbd2513830f7f..5060963707b1ed44d9b640454e9b0656a505d761 100644 (file)
@@ -91,6 +91,8 @@ enum iio_modifier {
        IIO_MOD_CO2,
        IIO_MOD_VOC,
        IIO_MOD_LIGHT_UV,
+       IIO_MOD_LIGHT_UVA,
+       IIO_MOD_LIGHT_UVB,
        IIO_MOD_LIGHT_DUV,
        IIO_MOD_PM1,
        IIO_MOD_PM2P5,
index 2eaaa7123b042b04dc9acb17d8eab53f704e773f..8073c9e4fe46a03c64fdd08ca0f9e0f1b656479c 100644 (file)
@@ -105,6 +105,8 @@ 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_UVA] = "uva",
+       [IIO_MOD_LIGHT_UVB] = "uvb",
        [IIO_MOD_LIGHT_DUV] = "duv",
        [IIO_MOD_QUATERNION] = "quaternion",
        [IIO_MOD_TEMP_AMBIENT] = "ambient",