diff options
author | Song Hongyan <hongyan.song@intel.com> | 2017-03-20 15:28:45 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-03-25 17:32:24 +0100 |
commit | d7ed89d5aadf09f1060cd3a9cf07df17447c7392 (patch) | |
tree | 1b253926d498d7746d1a4dc29a3686998507021f /drivers/iio/common/hid-sensors | |
parent | iio: hid-sensor-attributes: Fix gravity sensor scale value not right issue (diff) | |
download | linux-d7ed89d5aadf09f1060cd3a9cf07df17447c7392.tar.xz linux-d7ed89d5aadf09f1060cd3a9cf07df17447c7392.zip |
iio: hid: Add humidity sensor support
Environmental humidity sensor is a hid defined sensor,
it shows raw humidity measurement of air.
More information can be found in:
http://www.usb.org/developers/hidpage/HUTRR39b.pdf
According to IIO ABI definition, humidityrelative data output unit is
milli percent. Add the unit convert from percent to milli percent.
Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/common/hid-sensors')
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c index cfb2fdc3177f..81647cc64a7b 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c @@ -71,6 +71,8 @@ static struct { {HID_USAGE_SENSOR_TEMPERATURE, 0, 1000, 0}, {HID_USAGE_SENSOR_TEMPERATURE, HID_USAGE_SENSOR_UNITS_DEGREES, 1000, 0}, + + {HID_USAGE_SENSOR_HUMIDITY, 0, 1000, 0}, }; static int pow_10(unsigned power) |