Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 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>

authored by

Javier Carrasco and committed by
Jonathan Cameron
b89710bd ad662c6d

+11 -2
+5 -2
Documentation/ABI/testing/sysfs-bus-iio
··· 1574 1574 What: /sys/.../iio:deviceX/in_intensityY_ir_raw 1575 1575 What: /sys/.../iio:deviceX/in_intensityY_both_raw 1576 1576 What: /sys/.../iio:deviceX/in_intensityY_uv_raw 1577 + What: /sys/.../iio:deviceX/in_intensityY_uva_raw 1578 + What: /sys/.../iio:deviceX/in_intensityY_uvb_raw 1577 1579 What: /sys/.../iio:deviceX/in_intensityY_duv_raw 1578 1580 KernelVersion: 3.4 1579 1581 Contact: linux-iio@vger.kernel.org ··· 1584 1582 that measurements contain visible and infrared light 1585 1583 components or just infrared light, respectively. Modifier 1586 1584 uv indicates that measurements contain ultraviolet light 1587 - components. Modifier duv indicates that measurements 1588 - contain deep ultraviolet light components. 1585 + components. Modifiers uva, uvb and duv indicate that 1586 + measurements contain A, B or deep (C) ultraviolet light 1587 + components respectively. 1589 1588 1590 1589 What: /sys/.../iio:deviceX/in_uvindex_input 1591 1590 KernelVersion: 4.6
+2
drivers/iio/industrialio-core.c
··· 117 117 [IIO_MOD_LIGHT_GREEN] = "green", 118 118 [IIO_MOD_LIGHT_BLUE] = "blue", 119 119 [IIO_MOD_LIGHT_UV] = "uv", 120 + [IIO_MOD_LIGHT_UVA] = "uva", 121 + [IIO_MOD_LIGHT_UVB] = "uvb", 120 122 [IIO_MOD_LIGHT_DUV] = "duv", 121 123 [IIO_MOD_QUATERNION] = "quaternion", 122 124 [IIO_MOD_TEMP_AMBIENT] = "ambient",
+2
include/uapi/linux/iio/types.h
··· 91 91 IIO_MOD_CO2, 92 92 IIO_MOD_VOC, 93 93 IIO_MOD_LIGHT_UV, 94 + IIO_MOD_LIGHT_UVA, 95 + IIO_MOD_LIGHT_UVB, 94 96 IIO_MOD_LIGHT_DUV, 95 97 IIO_MOD_PM1, 96 98 IIO_MOD_PM2P5,
+2
tools/iio/iio_event_monitor.c
··· 105 105 [IIO_MOD_LIGHT_GREEN] = "green", 106 106 [IIO_MOD_LIGHT_BLUE] = "blue", 107 107 [IIO_MOD_LIGHT_UV] = "uv", 108 + [IIO_MOD_LIGHT_UVA] = "uva", 109 + [IIO_MOD_LIGHT_UVB] = "uvb", 108 110 [IIO_MOD_LIGHT_DUV] = "duv", 109 111 [IIO_MOD_QUATERNION] = "quaternion", 110 112 [IIO_MOD_TEMP_AMBIENT] = "ambient",