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

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.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ad662c6d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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",
+2 −0
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -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",