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

From: Andy Shevchenko
Date: Mon Jul 21 2025 - 07:45:10 EST


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>

--
With Best Regards,
Andy Shevchenko