Re: [PATCH 1/2] iio: humditiy: hdc3020: fix units for temperature and humidity measurement

From: Andy Shevchenko
Date: Thu Aug 21 2025 - 11:56:40 EST


On Thu, Aug 21, 2025 at 05:23:54PM +0200, Dimitri Fedrau via B4 Relay wrote:
> From: Dimitri Fedrau <dimitri.fedrau@xxxxxxxxxxxx>
>
> According to the ABI the units after application of scale and offset are
> milli degrees for temperature measurements and milli percent for relative
> humidity measurements. Change scale factor to fix this issue.

...

> if (chan->type == IIO_TEMP)
> - *val = 175;
> + *val = 175000;
> else
> - *val = 100;
> + *val = 100000;

Perhaps use " * MILL" uin both cases?

--
With Best Regards,
Andy Shevchenko