iio: Add modifiers for ethanol and H2 gases
authorAndreas Brauchli <a.brauchli@elementarea.net>
Thu, 13 Dec 2018 14:43:22 +0000 (15:43 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Dec 2018 14:05:58 +0000 (14:05 +0000)
Add ethanol and H2 gas modifiers:
* IIO_MOD_ETHANOL
* IIO_MOD_H2

Signed-off-by: Andreas Brauchli <andreas.brauchli@sensirion.com>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/ABI/testing/sysfs-bus-iio
include/uapi/linux/iio/types.h
tools/iio/iio_event_monitor.c

index 67fd88b..864f8ef 100644 (file)
@@ -1554,6 +1554,10 @@ What:            /sys/bus/iio/devices/iio:deviceX/in_concentration_raw
 What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_raw
 What:          /sys/bus/iio/devices/iio:deviceX/in_concentration_co2_raw
 What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_co2_raw
+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_voc_raw
 What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
 KernelVersion: 4.3
index c59adac..fdd81af 100644 (file)
@@ -92,6 +92,8 @@ enum iio_modifier {
        IIO_MOD_PM2P5,
        IIO_MOD_PM4,
        IIO_MOD_PM10,
+       IIO_MOD_ETHANOL,
+       IIO_MOD_H2,
 };
 
 enum iio_event_type {
index f6b8003..7bf9bde 100644 (file)
@@ -115,6 +115,8 @@ static const char * const iio_modifier_names[] = {
        [IIO_MOD_I] = "i",
        [IIO_MOD_Q] = "q",
        [IIO_MOD_CO2] = "co2",
+       [IIO_MOD_ETHANOL] = "ethanol",
+       [IIO_MOD_H2] = "h2",
        [IIO_MOD_VOC] = "voc",
        [IIO_MOD_PM1] = "pm1",
        [IIO_MOD_PM2P5] = "pm2p5",
@@ -205,6 +207,8 @@ static bool event_is_known(struct iio_event_data *event)
        case IIO_MOD_I:
        case IIO_MOD_Q:
        case IIO_MOD_CO2:
+       case IIO_MOD_ETHANOL:
+       case IIO_MOD_H2:
        case IIO_MOD_VOC:
        case IIO_MOD_PM1:
        case IIO_MOD_PM2P5: