Skip to content

Commit a69eeaa

Browse files
Dimitri Fedraujic23
authored andcommitted
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: c9180b8 ("iio: humidity: Add driver for ti HDC302x humidity sensors") Reviewed-by: Nuno Sa <nuno.sa@analog.com> Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> Link: https://lore.kernel.org/r/20240126135226.3977904-1-dima.fedrau@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 9c46e3a commit a69eeaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/humidity/hdc3020.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int hdc3020_read_raw(struct iio_dev *indio_dev,
322322
if (chan->type != IIO_TEMP)
323323
return -EINVAL;
324324

325-
*val = 16852;
325+
*val = -16852;
326326
return IIO_VAL_INT;
327327

328328
default:

0 commit comments

Comments
 (0)