All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nuno Sá" <nuno.sa@analog.com>, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 14/16] iio: frequency: ad9523: sync the dividers at the end of probe
Date: Mon, 30 Nov 2026 17:54:32 +0000	[thread overview]
Message-ID: <sashiko-outbox-241752@kernel.org> (raw)
In-Reply-To: <20261130-iio-ad9523-fw-v1-14-9aee15b7a7a2@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] iio: frequency: ad9523: ad9523_sync() called before VCO
  calibration completes
--

commit 7e67a340add8fb5732722b251d389371447f3b80
Author: Nuno Sá <nuno.sa@analog.com>

iio: frequency: ad9523: sync the dividers at the end of probe

This commit calls ad9523_sync() at the end of ad9523_probe() after
ad9523_setup() completes.

> diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
> index f0caaae4d39a8..216b1a92ce1a7 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;

[Severity: Medium]
Does ad9523_sync() run here while VCO calibration is still in progress?

ad9523_setup() stages AD9523_PLL2_VCO_CALIBRATE in the buffered
AD9523_PLL2_VCO_CTRL register, so calibration only starts when
ad9523_io_update() is called at the very end of ad9523_setup().  Nothing
polls AD9523_READBACK_1 for AD9523_READBACK_1_VCO_CALIB_IN_PROGRESS to
clear before ad9523_sync() pulses the distribution sync.

Also, ad9523_setup() initializes every channel powered down
(AD9523_CLK_DIST_PWR_DOWN_EN) with hardcoded divider (32) and phase (1)
values, so syncing during probe runs before the final divider and phase
settings are programmed at runtime.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130-iio-ad9523-fw-v1-0-9aee15b7a7a2@analog.com?part=14

  reply	other threads:[~2026-11-30 17:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 17:36 [PATCH 00/16] iio: frequency: ad9523: add firmware support Nuno Sá
2026-11-30 17:36 ` [PATCH 01/16] iio: frequency: ad9523: fix out of bounds access of vco_out_map Nuno Sá
2026-11-30 17:37 ` [PATCH 02/16] iio: frequency: ad9523: don't select a powered down M2 divider Nuno Sá
2026-11-30 17:37 ` [PATCH 03/16] iio: frequency: ad9523: fix the M2 divider selection Nuno Sá
2026-11-30 17:37 ` [PATCH 04/16] iio: frequency: ad9523: fix GPIO polarity handling Nuno Sá
2026-11-30 17:44   ` sashiko-bot
2026-11-30 17:37 ` [PATCH 05/16] iio: frequency: ad9523: factor out the channel divider calculation Nuno Sá
2026-11-30 17:37 ` [PATCH 06/16] MAINTAINERS: add an entry for the AD9523 driver Nuno Sá
2026-11-30 17:37 ` [PATCH 07/16] iio: frequency: ad9523: move the platform data into the driver Nuno Sá
2026-11-30 17:37 ` [PATCH 08/16] iio: frequency: ad9523: rename the platform data to config Nuno Sá
2026-11-30 17:37 ` [PATCH 09/16] iio: frequency: ad9523: always bypass PLL1 Nuno Sá
2026-11-30 17:37 ` [PATCH 10/16] iio: frequency: ad9523: drop unused channel options Nuno Sá
2026-11-30 17:37 ` [PATCH 11/16] iio: frequency: ad9523: use read_label() for channel names Nuno Sá
2026-11-30 17:37 ` [PATCH 12/16] dt-bindings: iio: frequency: Add AD9523-1 Nuno Sá
2026-11-30 18:50   ` Conor Dooley
2026-11-30 17:37 ` [PATCH 13/16] iio: frequency: ad9523: add firmware support and drop platform data Nuno Sá
2026-11-30 17:37 ` [PATCH 14/16] iio: frequency: ad9523: sync the dividers at the end of probe Nuno Sá
2026-11-30 17:54   ` sashiko-bot [this message]
2026-11-30 17:37 ` [PATCH 15/16] iio: frequency: ad9523: split the clock source selection Nuno Sá
2026-11-30 17:37 ` [PATCH 16/16] iio: frequency: ad9523: add clock provider support Nuno Sá

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-241752@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.