Re: [PATCH] iio: temperature: max30208: fix wrong scale value

From: Andy Shevchenko

Date: Tue Apr 28 2026 - 11:43:59 EST


On Tue, Apr 28, 2026 at 04:34:58PM +0100, Jonathan Cameron wrote:
> On Tue, 28 Apr 2026 14:36:00 +0100
> Salah Triki <salah.triki@xxxxxxxxx> wrote:
> > On Tue, Apr 28, 2026 at 02:00:48PM +0300, Andy Shevchenko wrote:
> > > On Tue, Apr 28, 2026 at 09:54:15AM +0100, Salah Triki wrote:

...

> > > Isn't it an ABI change?
> >
> > Yes, it technically changes the value exposed to user space. However, the
> > current scale (5) is objectively incorrect according to the datasheet
> > (0.005°C per LSB).
> >
> > With the current scale, a raw reading of 5000 (25°C) is reported as
> > 25000°C by user space tools. This makes the driver practically unusable
> > for standard IIO consumers without custom workarounds. Since the driver is
> > relatively recent, I believe fixing it now to match the hardware
> > specification is preferable to keeping a broken ABI.
>
> Yes. It's fine to fix completely wrong ABI like this. It can get messier
> in more subtle corners but out by a factor of 1000 is an easy one!
>
> > What do you think?

I think you need to write a wrap-up of the above and add to the commit message.
With that it will be justified as far as I am concerned.

--
With Best Regards,
Andy Shevchenko