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 08/12] iio: frequency: adf41513: driver implementation
Date: Sun, 24 May 2026 11:12:54 +0000 [thread overview]
Message-ID: <20260524111254.BE1231F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260524-adf41513-iio-driver-v14-8-06824d9c15f4@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The driver fails to restore the hardware register state during pm_resume if the device was placed in a software power-down state, leading to power leaks and cache corruption.
--
commit 829389d24bcc81427dbc259466ce431d38418a05
Author: Rodrigo Alencar <rodrigo.alencar@analog.com>
iio: frequency: adf41513: driver implementation
This commit introduces a new driver for the Analog Devices ADF41513 PLL
Frequency Synthesizer. It supports Integer-N and fractional-N synthesis
modes, high-resolution frequency calculations, IIO debugfs interface,
and power management.
> diff --git a/drivers/iio/frequency/adf41513.c b/drivers/iio/frequency/adf41513.c
> new file mode 100644
> index 0000000000000..6f952ccc675e0
> --- /dev/null
> +++ b/drivers/iio/frequency/adf41513.c
[ ... ]
> +static int adf41513_pm_resume(struct device *dev)
> +{
> + struct adf41513_state *st = dev_get_drvdata(dev);
> +
> + guard(mutex)(&st->lock);
> + if (st->powerdown)
> + return 0; /* nothing to do */
[Severity: High]
Does returning early here when the device is in software power-down fail to
restore the hardware register state?
If the system loses power to the device during suspend, the hardware
registers will reset to their Power-On Reset defaults.
By returning immediately without writing any state to the hardware, won't
the hardware wake up in an unconfigured state rather than the requested
power-down state?
Additionally, the software cache regs_hw is not invalidated and still
holds the pre-suspend values. If a parameter is subsequently modified,
the sync function uses ADF41513_SYNC_DIFF and skips writing unmodified
registers since they falsely appear up-to-date in regs_hw.
Could this leave the hardware permanently in a corrupted mixed state of
reset defaults and newly written values?
> +
> + return adf41513_resume(st);
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260524-adf41513-iio-driver-v14-0-06824d9c15f4@analog.com?part=8
next prev parent reply other threads:[~2026-05-24 11:12 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 [this message]
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
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=20260524111254.BE1231F000E9@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