Re: [PATCH v2] iio: humidity: hdc3020: fix temperature offset
From: Jonathan Cameron
Date: Sat Jan 27 2024 - 09:41:17 EST
On Fri, 26 Jan 2024 14:52:26 +0100
Dimitri Fedrau <dima.fedrau@xxxxxxxxx> 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
> Reviewed-by: Nuno Sa <nuno.sa@xxxxxxxxxx>
> Signed-off-by: Dimitri Fedrau <dima.fedrau@xxxxxxxxx>
> ---
> 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: