Re: [PATCH 14/16] iio: frequency: ad9523: sync the dividers at the end of probe

From: Jonathan Cameron

Date: Sat Dec 05 2026 - 18:10:38 EST


On Mon, 30 Nov 2026 17:37:12 +0000
Nuno Sá <nuno.sa@xxxxxxxxxx> wrote:

> The datasheet recommends initiating a distribution sync after the VCO
> calibration, so that the outputs get the deterministic phase
> relationship given by the programmed divider phases. The driver never
> does this on its own, leaving it up to userspace through the
> sync_dividers attribute.
>
> Sync the dividers once everything is set up during probe.
>
> Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
Sashiko has some views on this one.
https://sashiko.dev/#/patchset/20261130-iio-ad9523-fw-v1-0-9aee15b7a7a2%40analog.com
> ---
> drivers/iio/frequency/ad9523.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
> index f0caaae4d39a..216b1a92ce1a 100644
> --- a/drivers/iio/frequency/ad9523.c
> +++ b/drivers/iio/frequency/ad9523.c
> @@ -1409,6 +1409,10 @@ static int ad9523_probe(struct spi_device *spi)
> if (ret < 0)
> return ret;
>
> + ret = ad9523_sync(indio_dev);
> + if (ret < 0)
> + return ret;
> +
> return devm_iio_device_register(dev, indio_dev);
> }
>
>