iio: add IIO_MOD_O2 modifier

Add modifier IIO_MOD_O2 for O2 concentration reporting

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Matt Ranostay 2020-07-23 09:29:43 +03:00 committed by Jonathan Cameron
parent bc752d2f34
commit 4ffa22fd22
4 changed files with 6 additions and 0 deletions

View File

@ -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_concentrationX_ethanol_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentration_h2_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_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_concentration_voc_raw
What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
KernelVersion: 4.3 KernelVersion: 4.3

View File

@ -133,6 +133,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_PM10] = "pm10", [IIO_MOD_PM10] = "pm10",
[IIO_MOD_ETHANOL] = "ethanol", [IIO_MOD_ETHANOL] = "ethanol",
[IIO_MOD_H2] = "h2", [IIO_MOD_H2] = "h2",
[IIO_MOD_O2] = "o2",
}; };
/* relies on pairs of these shared then separate */ /* relies on pairs of these shared then separate */

View File

@ -94,6 +94,7 @@ enum iio_modifier {
IIO_MOD_PM10, IIO_MOD_PM10,
IIO_MOD_ETHANOL, IIO_MOD_ETHANOL,
IIO_MOD_H2, IIO_MOD_H2,
IIO_MOD_O2,
}; };
enum iio_event_type { enum iio_event_type {

View File

@ -119,6 +119,7 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_PM2P5] = "pm2p5", [IIO_MOD_PM2P5] = "pm2p5",
[IIO_MOD_PM4] = "pm4", [IIO_MOD_PM4] = "pm4",
[IIO_MOD_PM10] = "pm10", [IIO_MOD_PM10] = "pm10",
[IIO_MOD_O2] = "o2",
}; };
static bool event_is_known(struct iio_event_data *event) static bool event_is_known(struct iio_event_data *event)
@ -211,6 +212,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_MOD_PM2P5: case IIO_MOD_PM2P5:
case IIO_MOD_PM4: case IIO_MOD_PM4:
case IIO_MOD_PM10: case IIO_MOD_PM10:
case IIO_MOD_O2:
break; break;
default: default:
return false; return false;