[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240126135226.3977904-1-dima.fedrau@gmail.com>
Date: Fri, 26 Jan 2024 14:52:26 +0100
From: Dimitri Fedrau <dima.fedrau@...il.com>
To:
Cc: Dimitri Fedrau <dima.fedrau@...il.com>,
Nuno Sa <nuno.sa@...log.com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
Li peiyu <579lpy@...il.com>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2] 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: <c9180b8e39be> ("iio: humidity: Add driver for ti HDC302x humidity sensors")
Reviewed-by: Nuno Sa <nuno.sa@...log.com>
Signed-off-by: Dimitri Fedrau <dima.fedrau@...il.com>
---
Changes in V2:
- Added Fixes: tag
drivers/iio/humidity/hdc3020.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/humidity/hdc3020.c b/drivers/iio/humidity/hdc3020.c
index 4e3311170725..ed70415512f6 100644
--- a/drivers/iio/humidity/hdc3020.c
+++ b/drivers/iio/humidity/hdc3020.c
@@ -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:
--
2.39.2
Powered by blists - more mailing lists