linux-stable/drivers/iio
Andreas Klinger ca90f67ece iio: bmp280: fix compensation of humidity
[ Upstream commit dee2dabc0e ]

Limit the output of humidity compensation to the range between 0 and 100
percent.

Depending on the calibration parameters of the individual sensor it
happens, that a humidity above 100 percent or below 0 percent is
calculated, which don't make sense in terms of relative humidity.

Add a clamp to the compensation formula as described in the datasheet of
the sensor in chapter 4.2.3.

Although this clamp is documented, it was never in the driver of the
kernel.

It depends on the circumstances (calibration parameters, temperature,
humidity) if one can see a value above 100 percent without the clamp.
The writer of this patch was working with this type of sensor without
noting this error. So it seems to be a rare event when this bug occures.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:12 +02:00
..
accel iio: sca3000: Remove an erroneous 'get_device()' 2020-05-27 17:46:45 +02:00
adc iio: adc: stm32-adc: fix a wrong error message when probing interrupts 2020-06-10 20:24:56 +02:00
afe
amplifiers
buffer
chemical iio:chemical:pms7003: Fix timestamp alignment and prevent data leak. 2020-06-10 20:24:56 +02:00
common
dac iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()' 2020-05-27 17:46:45 +02:00
dummy
frequency
gyro
health
humidity
imu
light iio: vcnl4000: Fix i2c swapped word reading. 2020-06-10 20:24:56 +02:00
magnetometer
multiplexer
orientation
potentiometer
potentiostat
pressure iio: bmp280: fix compensation of humidity 2020-06-24 17:50:12 +02:00
proximity
resolver
temperature
trigger
iio_core.h
iio_core_trigger.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile