zephyr/drivers/sensor
Paul Sokolovsky b7623a85b0 sensors: Redefine SENSOR_CHAN_HUMIDITY in percents, not milli-percents.
Based on the discussion in #5693, the reason why humidity was defined
in milli-percent was likely following Linux which defines it as such
in its sensor subsystem:
http://elixir.free-electrons.com/linux/latest/source/Documentation/ABI/testing/sysfs-bus-iio#L263

However, Linux defines temperature in milli-degrees either, but
Zephyr uses degrees (similarly for most other quantities). Typical
sensor resolution/precision for humidity is also on the order of 1%.

One of the existing drivers, th02.c, already returned values in
percents, and few apps showed it without conversion and/or units,
leading to confusing output to user like "54500".

So, switching units to percents, and update all the drivers and
sample apps.

For few drivers, there was also optimized conversion arithmetics
to avoid u64_t operations. (There're probably more places to
optimize it, and temperature conversion could use such optimization
too, but that's left for another patch.)

Fixes: #5693

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-02-05 14:10:39 +01:00
..
adxl362 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
ak8975 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
amg88xx drivers: sensors: add driver for amg88xx sensor 2018-01-07 16:04:45 -05:00
apds9960 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
bma280 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
bmc150_magn kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
bme280 sensors: Redefine SENSOR_CHAN_HUMIDITY in percents, not milli-percents. 2018-02-05 14:10:39 +01:00
bmg160 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
bmi160 kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
bmm150 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
dht sensors: Redefine SENSOR_CHAN_HUMIDITY in percents, not milli-percents. 2018-02-05 14:10:39 +01:00
fxas21002 dts: sensor: Add dts yaml bindings for the fxas21002 sensor 2018-01-31 10:17:58 -06:00
fxos8700 dts: sensor: Add dts yaml bindings for the fxos8700 sensor 2018-01-31 10:17:58 -06:00
hdc1008 sensors: Redefine SENSOR_CHAN_HUMIDITY in percents, not milli-percents. 2018-02-05 14:10:39 +01:00
hmc5883l kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
hp206c kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
hts221 sensors: Redefine SENSOR_CHAN_HUMIDITY in percents, not milli-percents. 2018-02-05 14:10:39 +01:00
isl29035 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
lis2dh kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
lis3dh kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
lis3mdl sensors: dts: cleanup usage of HAS_DTS_I2C_DEVICE 2018-01-29 22:25:41 -05:00
lps22hb sensors: dts: cleanup usage of HAS_DTS_I2C_DEVICE 2018-01-29 22:25:41 -05:00
lps25hb kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
lsm6ds0 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
lsm6dsl sensors: dts: cleanup usage of HAS_DTS_I2C_DEVICE 2018-01-29 22:25:41 -05:00
lsm9ds0_gyro kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
lsm9ds0_mfd kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
max30101 dts: sensor: Add dts yaml bindings for the max30101 sensor 2018-01-31 10:17:58 -06:00
max44009 kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
mcp9808 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mpu6050 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
nrf5 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
pms7003 drivers: sensor: Fix some code style issues 2017-11-27 22:17:38 -05:00
sht3xd sensors: Redefine SENSOR_CHAN_HUMIDITY in percents, not milli-percents. 2018-02-05 14:10:39 +01:00
sx9500 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
th02 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
tmp007 kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
tmp112 kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
vl53l0x sensors: dts: cleanup usage of HAS_DTS_I2C_DEVICE 2018-01-29 22:25:41 -05:00
CMakeLists.txt driver: sensor: Add vl53l0x 2018-01-23 10:14:49 -06:00
Kconfig driver: sensor: Add vl53l0x 2018-01-23 10:14:49 -06:00
sensor_handlers.c sensors: move userspace handlers location 2017-10-30 13:20:19 -07:00