Skip to content

Commit

Permalink
iio: add IIO_MOD_O2 modifier
Browse files Browse the repository at this point in the history
Add modifier IIO_MOD_O2 for O2 concentration reporting

Signed-off-by: Matt Ranostay <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
mranostay authored and jic23 committed Aug 22, 2020
1 parent bc752d2 commit 4ffa22f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-iio
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_concentration_ethanol_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_ethanol_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentration_h2_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_h2_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentration_o2_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_o2_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentration_voc_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
KernelVersion: 4.3
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_PM10] = "pm10",
[IIO_MOD_ETHANOL] = "ethanol",
[IIO_MOD_H2] = "h2",
[IIO_MOD_O2] = "o2",
};

/* relies on pairs of these shared then separate */
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/iio/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ enum iio_modifier {
IIO_MOD_PM10,
IIO_MOD_ETHANOL,
IIO_MOD_H2,
IIO_MOD_O2,
};

enum iio_event_type {
Expand Down
2 changes: 2 additions & 0 deletions tools/iio/iio_event_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_PM2P5] = "pm2p5",
[IIO_MOD_PM4] = "pm4",
[IIO_MOD_PM10] = "pm10",
[IIO_MOD_O2] = "o2",
};

static bool event_is_known(struct iio_event_data *event)
Expand Down Expand Up @@ -211,6 +212,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_MOD_PM2P5:
case IIO_MOD_PM4:
case IIO_MOD_PM10:
case IIO_MOD_O2:
break;
default:
return false;
Expand Down

0 comments on commit 4ffa22f

Please sign in to comment.