Commit a69eeaad authored by Dimitri Fedrau's avatar Dimitri Fedrau Committed by Jonathan Cameron
Browse files

iio: humidity: hdc3020: fix temperature offset



The temperature offset should be negative according to the datasheet.
Adding a minus to the existing offset results in correct temperature
calculations.

Fixes: c9180b8e ("iio: humidity: Add driver for ti HDC302x humidity sensors")
Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Signed-off-by: default avatarDimitri Fedrau <dima.fedrau@gmail.com>
Link: https://lore.kernel.org/r/20240126135226.3977904-1-dima.fedrau@gmail.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 9c46e3a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ static int hdc3020_read_raw(struct iio_dev *indio_dev,
		if (chan->type != IIO_TEMP)
			return -EINVAL;

		*val = 16852;
		*val = -16852;
		return IIO_VAL_INT;

	default: