]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: humditiy: hdc3020: fix units for thresholds and hysteresis
authorDimitri Fedrau <dimitri.fedrau@liebherr.com>
Thu, 16 Oct 2025 05:20:39 +0000 (07:20 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Oct 2025 10:46:24 +0000 (11:46 +0100)
commitcb372b4f46d4285e5d2c07ba734374151b8e34e7
tree05b22932f4eeb0c2a7b0fe9bda58590c7fb614a9
parent7b8dc11c0a830caa0d890c603d597161c6c26095
iio: humditiy: hdc3020: fix units for thresholds and hysteresis

According to the ABI the units after application of scale and offset are
milli degree celsius for temperature thresholds and milli percent for
relative humidity thresholds. Currently the resulting units are degree
celsius for temperature thresholds and hysteresis and percent for relative
humidity thresholds and hysteresis. Change scale factor to fix this issue.

Fixes: 3ad0e7e5f0cb ("iio: humidity: hdc3020: add threshold events support")
Reported-by: Chris Lesiak <chris.lesiak@licorbio.com>
Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/humidity/hdc3020.c