[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdhtF1NgygHCRaW-+A83Qz-O8bMEfeMoF9ke-Hno+e4tQ@mail.gmail.com>
Date: Sat, 30 Aug 2025 08:00:15 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Marcelo Schmitt <marcelo.schmitt@...log.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, devicetree@...r.kernel.org,
linux-spi@...r.kernel.org, jic23@...nel.org, Michael.Hennerich@...log.com,
nuno.sa@...log.com, eblanc@...libre.com, dlechner@...libre.com,
andy@...nel.org, corbet@....net, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, broonie@...nel.org, Jonathan.Cameron@...wei.com,
andriy.shevchenko@...ux.intel.com, ahaslam@...libre.com,
marcelo.schmitt1@...il.com
Subject: Re: [PATCH 01/15] iio: adc: ad4030: Fix _scale for when oversampling
is enabled
On Sat, Aug 30, 2025 at 3:40 AM Marcelo Schmitt
<marcelo.schmitt@...log.com> wrote:
>
> Previously, the AD4030 driver was using the number of scan realbits for the
> voltage channel to derive the scale to millivolts. Though, when sample
> averaging is enabled (oversampling_ratio > 1), the number of scan realbits
> for the channel is set to 30 and doesn't match the amount of conversion
> precision bits. Due to that, the calculated channel scale did not correctly
> scale raw sample data to millivolt units in those cases. Use chip specific
> precision bits to derive the correct channel _scale on every and all
> channel configuration.
>
> Fixes: dc78e71d7c15 ("iio: adc: ad4030: remove some duplicate code")
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@...log.com>
> ---
> This was probalby buggy since
> commit 949abd1ca5a4 ("iio: adc: ad4030: add averaging support")
> but I decided to set the fixes tag with dc78e71d7c15 because this patch will
> not apply cleanly over 949abd1ca5a4.
FWIW, you may add a few Fixes tags: The original one, and the one(s)
which changed
drastically the code. In any case for the small conflicts we don't
care, just put the correct Fixes and if needed to backport, one
provides an updated patch specifically for backporting.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists