Re: [PATCH v3 3/7] iio: adc: ad7625: fix sampling frequency handling

From: Jonathan Cameron

Date: Fri Nov 06 2026 - 20:55:09 EST


On Fri, 6 Nov 2026 18:05:15 +0200
Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@xxxxxxxxxx> wrote:

> Fix sampling frequency handling issues:
>
> - Fix issue where writing 0 to sampling_frequency caused a division by
> zero. Return -EINVAL.
> - Fix issue where a waveform rounded up by the PWM went unreported.
> pwm_round_waveform_might_sleep() returns 1 in that case and
> ad7625_set_sampling_freq() passed it on, so the sampling_frequency write
> returned 1 and the new waveforms were dropped. Return -EINVAL.
> - Fix issue where probe() continued after failing to set the initial
> sampling frequency. The dev_err_probe() result was not returned, leaving
> the PWMs unconfigured. Return the error.
>
> Fixes: b7ffd0fa65e9 ("iio: adc: ad7625: add driver")
> Signed-off-by: Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@xxxxxxxxxx>
These are all clearly bad. Are they affecting known boards
out there? I'm wondering whether to try and take this ahead
of the rest of the series. For now I'm assuming it can wait
as it makes our lives easier by not holding up the rest of the
series.

Jonathan