Commit b89710bd authored by Javier Carrasco's avatar Javier Carrasco Committed by Jonathan Cameron

iio: add modifiers for A and B ultraviolet light

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: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20231110-veml6075-v3-1-6ee46775b422@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ad662c6d
...@@ -1574,6 +1574,8 @@ What: /sys/.../iio:deviceX/in_intensityY_raw ...@@ -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_ir_raw
What: /sys/.../iio:deviceX/in_intensityY_both_raw What: /sys/.../iio:deviceX/in_intensityY_both_raw
What: /sys/.../iio:deviceX/in_intensityY_uv_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 What: /sys/.../iio:deviceX/in_intensityY_duv_raw
KernelVersion: 3.4 KernelVersion: 3.4
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
...@@ -1582,8 +1584,9 @@ Description: ...@@ -1582,8 +1584,9 @@ Description:
that measurements contain visible and infrared light that measurements contain visible and infrared light
components or just infrared light, respectively. Modifier components or just infrared light, respectively. Modifier
uv indicates that measurements contain ultraviolet light uv indicates that measurements contain ultraviolet light
components. Modifier duv indicates that measurements components. Modifiers uva, uvb and duv indicate that
contain deep ultraviolet light components. measurements contain A, B or deep (C) ultraviolet light
components respectively.
What: /sys/.../iio:deviceX/in_uvindex_input What: /sys/.../iio:deviceX/in_uvindex_input
KernelVersion: 4.6 KernelVersion: 4.6
......
...@@ -117,6 +117,8 @@ static const char * const iio_modifier_names[] = { ...@@ -117,6 +117,8 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue", [IIO_MOD_LIGHT_BLUE] = "blue",
[IIO_MOD_LIGHT_UV] = "uv", [IIO_MOD_LIGHT_UV] = "uv",
[IIO_MOD_LIGHT_UVA] = "uva",
[IIO_MOD_LIGHT_UVB] = "uvb",
[IIO_MOD_LIGHT_DUV] = "duv", [IIO_MOD_LIGHT_DUV] = "duv",
[IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_QUATERNION] = "quaternion",
[IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_AMBIENT] = "ambient",
......
...@@ -91,6 +91,8 @@ enum iio_modifier { ...@@ -91,6 +91,8 @@ enum iio_modifier {
IIO_MOD_CO2, IIO_MOD_CO2,
IIO_MOD_VOC, IIO_MOD_VOC,
IIO_MOD_LIGHT_UV, IIO_MOD_LIGHT_UV,
IIO_MOD_LIGHT_UVA,
IIO_MOD_LIGHT_UVB,
IIO_MOD_LIGHT_DUV, IIO_MOD_LIGHT_DUV,
IIO_MOD_PM1, IIO_MOD_PM1,
IIO_MOD_PM2P5, IIO_MOD_PM2P5,
......
...@@ -105,6 +105,8 @@ static const char * const iio_modifier_names[] = { ...@@ -105,6 +105,8 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_GREEN] = "green",
[IIO_MOD_LIGHT_BLUE] = "blue", [IIO_MOD_LIGHT_BLUE] = "blue",
[IIO_MOD_LIGHT_UV] = "uv", [IIO_MOD_LIGHT_UV] = "uv",
[IIO_MOD_LIGHT_UVA] = "uva",
[IIO_MOD_LIGHT_UVB] = "uvb",
[IIO_MOD_LIGHT_DUV] = "duv", [IIO_MOD_LIGHT_DUV] = "duv",
[IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_QUATERNION] = "quaternion",
[IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_AMBIENT] = "ambient",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment