diff options
| author | Dimitri Fedrau <[email protected]> | 2024-01-26 14:52:26 +0100 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2024-01-27 14:40:07 +0000 |
| commit | a69eeaad093dd2c8fd0b216c8143b380b73d672d (patch) | |
| tree | d7f36446682b4829c2bccb170fdcc9f4e3145260 | |
| parent | 9c46e3a5232d855a65f440b298a2a66497f799d2 (diff) | |
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 <[email protected]>
Signed-off-by: Dimitri Fedrau <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
| -rw-r--r-- | drivers/iio/humidity/hdc3020.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |