Skip to content

Commit 671c830

Browse files
javiercarrascocruzpelwell
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 95a9fd6 commit 671c830

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,8 @@ What: /sys/.../iio:deviceX/in_intensityY_raw
15291529
What: /sys/.../iio:deviceX/in_intensityY_ir_raw
15301530
What: /sys/.../iio:deviceX/in_intensityY_both_raw
15311531
What: /sys/.../iio:deviceX/in_intensityY_uv_raw
1532+
What: /sys/.../iio:deviceX/in_intensityY_uva_raw
1533+
What: /sys/.../iio:deviceX/in_intensityY_uvb_raw
15321534
What: /sys/.../iio:deviceX/in_intensityY_duv_raw
15331535
KernelVersion: 3.4
15341536
@@ -1537,8 +1539,9 @@ Description:
15371539
that measurements contain visible and infrared light
15381540
components or just infrared light, respectively. Modifier
15391541
uv indicates that measurements contain ultraviolet light
1540-
components. Modifier duv indicates that measurements
1541-
contain deep ultraviolet light components.
1542+
components. Modifiers uva, uvb and duv indicate that
1543+
measurements contain A, B or deep (C) ultraviolet light
1544+
components respectively.
15421545

15431546
What: /sys/.../iio:deviceX/in_uvindex_input
15441547
KernelVersion: 4.6

drivers/iio/industrialio-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ static const char * const iio_modifier_names[] = {
113113
[IIO_MOD_LIGHT_GREEN] = "green",
114114
[IIO_MOD_LIGHT_BLUE] = "blue",
115115
[IIO_MOD_LIGHT_UV] = "uv",
116+
[IIO_MOD_LIGHT_UVA] = "uva",
117+
[IIO_MOD_LIGHT_UVB] = "uvb",
116118
[IIO_MOD_LIGHT_DUV] = "duv",
117119
[IIO_MOD_QUATERNION] = "quaternion",
118120
[IIO_MOD_TEMP_AMBIENT] = "ambient",

include/uapi/linux/iio/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ enum iio_modifier {
8787
IIO_MOD_CO2,
8888
IIO_MOD_VOC,
8989
IIO_MOD_LIGHT_UV,
90+
IIO_MOD_LIGHT_UVA,
91+
IIO_MOD_LIGHT_UVB,
9092
IIO_MOD_LIGHT_DUV,
9193
IIO_MOD_PM1,
9294
IIO_MOD_PM2P5,

tools/iio/iio_event_monitor.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ static const char * const iio_modifier_names[] = {
101101
[IIO_MOD_LIGHT_GREEN] = "green",
102102
[IIO_MOD_LIGHT_BLUE] = "blue",
103103
[IIO_MOD_LIGHT_UV] = "uv",
104+
[IIO_MOD_LIGHT_UVA] = "uva",
105+
[IIO_MOD_LIGHT_UVB] = "uvb",
104106
[IIO_MOD_LIGHT_DUV] = "duv",
105107
[IIO_MOD_QUATERNION] = "quaternion",
106108
[IIO_MOD_TEMP_AMBIENT] = "ambient",

0 commit comments

Comments
 (0)