]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:24:58 +0000 (06:24 +0900)
commit9434c58b8e421f3638fd0d412a8ff4598524a724
tree5fad15c5ffd9163d26577f8fea9d8e7dbb61e81d
parent70e1c26f8c469f6d02444920614a12a689dd4a45
iio: humditiy: hdc3020: fix units for thresholds and hysteresis

commit cb372b4f46d4285e5d2c07ba734374151b8e34e7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/humidity/hdc3020.c