Re: [PATCH v2 1/1] iio: adc: ad4170-4: Correctly update filter_fs after filter type change

From: Jonathan Cameron
Date: Thu Jul 24 2025 - 08:52:20 EST


On Mon, 21 Jul 2025 14:43:38 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Sun, Jul 20, 2025 at 12:37:24PM -0300, Marcelo Schmitt wrote:
> > Previously, the driver was directly using the filter type value to update
> > the filter frequency (filter_fs) configuration. That caused the driver to
> > switch to the lowest filter_fs configuration (highest sampling frequency)
> > on every update to the filter type. Correct the filter_fs collateral update
> > by clamping it to the range of supported values instead of mistakenly
> > using the filter type to update the filter_fs.
> >
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > Link: https://lore.kernel.org/linux-iio/c6e54942-5b42-484b-be53-9d4606fd25c4@sabinyo.mountain/
>
> You mean Closes: here?
>
> > Suggested-by: Jonathan Cameron <jic23@xxxxxxxxxx>
> > Fixes: 8ab7434734cd ("iio: adc: ad4170-4: Add digital filter and sample frequency config support")
> > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
>

I picked up v1 and made that a closes tag. Links to email threads are fine
(there was a question in v1 on this).

Applied to the fixes-togreg-for-6.17 branch.