iio: Add support for humidity sensors
authorHarald Geyer <harald@ccbib.org>
Sun, 1 Dec 2013 15:08:00 +0000 (15:08 +0000)
committerJonathan Cameron <jic23@kernel.org>
Tue, 3 Dec 2013 20:22:29 +0000 (20:22 +0000)
There are already humidity sensors in the hwmon subsystem,
so we use their unit (milli percent) here as well.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-core.c
include/linux/iio/types.h

index b20e829d350f7fa207760fd4c43c6f9b7db7cb60..6e02c5029152ea0832fdebdfa9bd9aff14188b2d 100644 (file)
@@ -197,6 +197,19 @@ Description:
                Raw pressure measurement from channel Y. Units after
                application of scale and offset are kilopascal.
 
+What:          /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw
+KernelVersion: 3.14
+Contact:       linux-iio@vger.kernel.org
+Description:
+               Raw humidity measurement of air. Units after application of
+               scale and offset are milli percent.
+
+What:          /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_input
+KernelVersion: 3.14
+Contact:       linux-iio@vger.kernel.org
+Description:
+               Scaled humidity measurement in milli percent.
+
 What:          /sys/bus/iio/devices/iio:deviceX/in_accel_offset
 What:          /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
 What:          /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
index 2fe88c189f74cd346c01dd45f81060f92a077c59..acc911a836ca19e94d6ef0e0cebaee1df9935888 100644 (file)
@@ -69,6 +69,7 @@ static const char * const iio_chan_type_name_spec[] = {
        [IIO_ALTVOLTAGE] = "altvoltage",
        [IIO_CCT] = "cct",
        [IIO_PRESSURE] = "pressure",
+       [IIO_HUMIDITYRELATIVE] = "humidityrelative",
 };
 
 static const char * const iio_modifier_names[] = {
index 4ac928ee31c5e4c59c03de6aff936190168bb1f2..084d882fe01b9d9f6a5714f19b520efa2eff7991 100644 (file)
@@ -29,6 +29,7 @@ enum iio_chan_type {
        IIO_ALTVOLTAGE,
        IIO_CCT,
        IIO_PRESSURE,
+       IIO_HUMIDITYRELATIVE,
 };
 
 enum iio_modifier {