Skip to content

Commit c0e4e0f

Browse files
LoracJonathan Cameron
authored andcommitted
iio: Add modifier for DUV light
Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 1c28799 commit c0e4e0f

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎Documentation/ABI/testing/sysfs-bus-iio‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,13 +1307,16 @@ What: /sys/.../iio:deviceX/in_intensityY_raw
13071307
What: /sys/.../iio:deviceX/in_intensityY_ir_raw
13081308
What: /sys/.../iio:deviceX/in_intensityY_both_raw
13091309
What: /sys/.../iio:deviceX/in_intensityY_uv_raw
1310+
What: /sys/.../iio:deviceX/in_intensityY_duv_raw
13101311
KernelVersion: 3.4
13111312
Contact: linux-iio@vger.kernel.org
13121313
Description:
13131314
Unit-less light intensity. Modifiers both and ir indicate
13141315
that measurements contain visible and infrared light
1315-
components or just infrared light, respectively. Modifier uv indicates
1316-
that measurements contain ultraviolet light components.
1316+
components or just infrared light, respectively. Modifier
1317+
uv indicates that measurements contain ultraviolet light
1318+
components. Modifier duv indicates that measurements
1319+
contain deep ultraviolet light components.
13171320

13181321
What: /sys/.../iio:deviceX/in_uvindex_input
13191322
KernelVersion: 4.6

‎drivers/iio/industrialio-core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static const char * const iio_modifier_names[] = {
110110
[IIO_MOD_LIGHT_GREEN] = "green",
111111
[IIO_MOD_LIGHT_BLUE] = "blue",
112112
[IIO_MOD_LIGHT_UV] = "uv",
113+
[IIO_MOD_LIGHT_DUV] = "duv",
113114
[IIO_MOD_QUATERNION] = "quaternion",
114115
[IIO_MOD_TEMP_AMBIENT] = "ambient",
115116
[IIO_MOD_TEMP_OBJECT] = "object",

‎include/uapi/linux/iio/types.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ enum iio_modifier {
8686
IIO_MOD_CO2,
8787
IIO_MOD_VOC,
8888
IIO_MOD_LIGHT_UV,
89+
IIO_MOD_LIGHT_DUV,
8990
};
9091

9192
enum iio_event_type {

‎tools/iio/iio_event_monitor.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static const char * const iio_modifier_names[] = {
9898
[IIO_MOD_LIGHT_GREEN] = "green",
9999
[IIO_MOD_LIGHT_BLUE] = "blue",
100100
[IIO_MOD_LIGHT_UV] = "uv",
101+
[IIO_MOD_LIGHT_DUV] = "duv",
101102
[IIO_MOD_QUATERNION] = "quaternion",
102103
[IIO_MOD_TEMP_AMBIENT] = "ambient",
103104
[IIO_MOD_TEMP_OBJECT] = "object",
@@ -182,6 +183,7 @@ static bool event_is_known(struct iio_event_data *event)
182183
case IIO_MOD_LIGHT_GREEN:
183184
case IIO_MOD_LIGHT_BLUE:
184185
case IIO_MOD_LIGHT_UV:
186+
case IIO_MOD_LIGHT_DUV:
185187
case IIO_MOD_QUATERNION:
186188
case IIO_MOD_TEMP_AMBIENT:
187189
case IIO_MOD_TEMP_OBJECT:

0 commit comments

Comments
 (0)