From: sashiko-bot@kernel.org
To: "Rodrigo Alencar via B4 Relay"
<devnull+rodrigo.alencar.analog.com@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v14 10/12] iio: frequency: adf41513: features on frequency change
Date: Sun, 24 May 2026 11:15:37 +0000 [thread overview]
Message-ID: <20260524111537.E0DA51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260524-adf41513-iio-driver-v14-10-06824d9c15f4@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Bleed current is not computed or updated when switching from Integer-N to Fractional-N mode if the PFD frequency remains unchanged.
--
commit 299bd27511dd5b2a2354c749631d53bcff158e2b
Author: Rodrigo Alencar <rodrigo.alencar@analog.com>
iio: frequency: adf41513: features on frequency change
This commit adds bleed current configuration, lock detector window adjustments,
and phase resync support to the ADF41513 driver when changing the PFD
frequency.
> diff --git a/drivers/iio/frequency/adf41513.c b/drivers/iio/frequency/adf41513.c
> --- a/drivers/iio/frequency/adf41513.c
> +++ b/drivers/iio/frequency/adf41513.c
[ ... ]
> +static void adf41513_set_bleed_val(struct adf41513_state *st)
> +{
> + u32 bleed_value, cp_index;
> +
> + if (!(st->regs[ADF41513_REG6] & ADF41513_REG6_BLEED_ENABLE_MSK))
> + return;
[ ... ]
> @@ -630,6 +725,14 @@ static int adf41513_set_frequency(struct adf41513_state *st, u64 freq_uhz, u16 s
> st->regs[ADF41513_REG6] |= ADF41513_REG6_BLEED_ENABLE_MSK;
> }
>
> + if (pfd_change) {
> + adf41513_set_bleed_val(st);
[Severity: High]
Will the bleed current be properly configured if the device switches
from Integer-N to Fractional-N mode without changing the PFD frequency?
In adf41513_set_bleed_val(), if the device is previously in Integer-N mode,
ADF41513_REG6_BLEED_ENABLE_MSK is cleared. If the PFD frequency changes
while in Integer-N mode, adf41513_set_bleed_val() returns early without
updating the register.
If a subsequent frequency change switches the PLL to Fractional-N mode but
maintains the exact same PFD frequency, pfd_change will be false. Since
adf41513_set_bleed_val() is only called when pfd_change is true, the bleed
value configuration gets skipped entirely.
Could this leave the bleed circuit enabled with a stale or uninitialized
current value, potentially preventing the PLL from locking?
> + adf41513_set_phase_resync(st);
> + }
> +
> + if (pfd_change || mode_change)
> + adf41513_set_ld_window(st);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260524-adf41513-iio-driver-v14-0-06824d9c15f4@analog.com?part=10
next prev parent reply other threads:[~2026-05-24 11:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 10:35 [PATCH v14 00/12] ADF41513/ADF41510 PLL frequency synthesizers Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 01/12] dt-bindings: iio: frequency: add adf41513 Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 02/12] lib: kstrtox: add local _parse_integer_limit_init() helper Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 03/12] lib: kstrtox: add kstrtoudec64() and kstrtodec64() Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 04/12] lib: test-kstrtox: tests for kstrtodec64() and kstrtoudec64() Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 05/12] lib: math: div64: add div64_s64_rem() Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 06/12] iio: core: add decimal value formatting into 64-bit value Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 07/12] iio: test: iio-test-format: add test case for decimal format Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 08/12] iio: frequency: adf41513: driver implementation Rodrigo Alencar via B4 Relay
2026-05-24 11:12 ` sashiko-bot
2026-05-24 12:34 ` Rodrigo Alencar
2026-05-24 10:35 ` [PATCH v14 09/12] iio: frequency: adf41513: handle LE synchronization feature Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 10/12] iio: frequency: adf41513: features on frequency change Rodrigo Alencar via B4 Relay
2026-05-24 11:15 ` sashiko-bot [this message]
2026-05-24 12:29 ` Rodrigo Alencar
2026-05-24 10:35 ` [PATCH v14 11/12] docs: iio: add documentation for adf41513 driver Rodrigo Alencar via B4 Relay
2026-05-24 10:35 ` [PATCH v14 12/12] Documentation: ABI: testing: add common ABI file for iio/frequency Rodrigo Alencar via B4 Relay
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=20260524111537.E0DA51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+rodrigo.alencar.analog.com@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox