patch "iio: humditiy: hdc3020: fix units for temperature and humidity" added to char-misc-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: humditiy: hdc3020: fix units for temperature and humidity
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 7b8dc11c0a830caa0d890c603d597161c6c26095 Mon Sep 17 00:00:00 2001
From: Dimitri Fedrau <[email protected]>
Date: Thu, 16 Oct 2025 07:20:38 +0200
Subject: iio: humditiy: hdc3020: fix units for temperature and humidity
measurement
According to the ABI the units after application of scale and offset are milli degrees for temperature measurements and milli percent for relative humidity measurements. Currently the resulting units are degree celsius for temperature measurements and percent for relative humidity measurements. Change scale factor to fix this issue.
--- drivers/iio/humidity/hdc3020.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/humidity/hdc3020.c +2 -2
@@ -301,9 +301,9 @@ static int hdc3020_read_raw(struct iio_dev *indio_dev,case IIO_CHAN_INFO_SCALE : *val2 =65536 ;if (chan->type ==IIO_TEMP ) - *val =175 ; + *val =175 *MILLI ;else - *val =100 ; + *val =100 *MILLI ;return IIO_VAL_FRACTIONAL ;case IIO_CHAN_INFO_OFFSET :
Signature · 1 line
2.51.2