iio: humidity: hdc3020: fix temperature offset
Subsystems (2)
PATCH v2 1/1 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.
---
Changes in V2:
- Added Fixes: tag
drivers/iio/humidity/hdc3020.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/humidity/hdc3020.c +1 -1
@@ -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 :
Signature · 1 line
2.39.2
Quoted 5 lines · On Fri, 26 Jan 2024 14:52:26 +0100 Dimitri Fedrau <[email protected]> wrote:
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")
<> are not part of the fixes tag syntax. I guess you saw the one case of that which was in my tree earlier in the week and I've now fixed up?
I've fixed it up here as well.
Applied to the fixes-togreg branch of iio.git.
Jonathan
Quoted 22 lines
Reviewed-by Nuno Sa <[email protected]>Signed-off-by Dimitri Fedrau <[email protected]>---
Changes in V2:
- Added Fixes: tagdrivers/iio/humidity/hdc3020.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/humidity/hdc3020.c +1
-1@@ -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 :
Am Sat, Jan 27, 2024 at 02:40:55PM +0000 schrieb Jonathan Cameron:
Quoted 7 lines
Quoted 4 lines · On Fri, 26 Jan 2024 14:52:26 +0100 Dimitri Fedrau <[email protected]> wrote:
The temperature offset should be negative according to the datasheet. Adding a minus to the existing offset results in correct temperature calculations.
Quoted 6 lines
Quoted 1 line
Fixes <c9180b8e39be> ("iio: humidity: Add driver for ti HDC302x humidity sensors")<> are not part of the fixes tag syntax. I guess you saw the one case of that which was in my tree earlier in the week and I've now fixed up?
Yes, picked up the only commit with <>. It is fixed now.
Quoted 2 lines
I've fixed it up here as well.
Thanks.
Quoted 4 lines
Applied to the fixes-togreg branch of iio.git.
Jonathan
Dimitri