From: sashiko-bot@kernel.org
To: "Shubham Patil" <shubhamsanjay.patil@amd.com>
Cc: linux-i3c@lists.infradead.org, robh@kernel.org,
devicetree@vger.kernel.org, Frank.Li@kernel.org,
conor+dt@kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] dt-bindings: i3c: dw: Document missing optional core reset
Date: Fri, 17 Jul 2026 11:10:41 +0000 [thread overview]
Message-ID: <20260717111042.3C2921F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260717105829.567522-1-shubhamsanjay.patil@amd.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] The dt-binding specifies the APB clock name as 'apb', but the driver attempts to fetch it using the name 'pclk'.
- [High] Mixing devm_clk_get_enabled() with manual runtime PM clock toggling causes unbalanced clock disables.
--
--- Patch [1]: [PATCH] dt-bindings: i3c: dw: Document missing optional core reset ---
commit 3d9cd37483dab62bf65ce3e70bf1ff17d3bd87d7
Author: Shubham Patil <shubhamsanjay.patil@amd.com>
dt-bindings: i3c: dw: Document missing optional core reset
The DesignWare I3C master IP supports a core reset input, but the
binding is missing the corresponding reset description. Document the
reset property and name in the binding. Keep the reset optional because
the reset line is integration-specific.
> diff --git a/Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml b/Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml
> index e803457d3f554..822faf8d221b8 100644
> --- a/Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml
> +++ b/Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml
> @@ -38,6 +38,12 @@ properties:
> interrupts:
> maxItems: 1
>
[Severity: High]
This is a pre-existing issue, but I noticed a potential mismatch between the
DT binding and the driver for the APB clock while reviewing this file.
The binding enforces the name 'apb':
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml:
- const: apb
However, the driver requests it by the name 'pclk':
drivers/i3c/master/dw-i3c-master.c:dw_i3c_common_probe() {
...
master->pclk = devm_clk_get_optional_enabled(&pdev->dev, "pclk");
...
}
If a device tree is created strictly following the binding using clock-names =
"core", "apb", won't dw_i3c_common_probe() fail to find the "pclk" clock?
Since it is requested as optional, the probe will succeed but subsequent
register accesses will occur without the APB clock enabled. Could this lead to
a synchronous external abort or system freeze during operation?
> + resets:
> + maxItems: 1
> +
> + reset-names:
> + const: core_rst
> +
> power-domains:
> maxItems: 1
[Severity: High]
This is also a pre-existing issue, but I noticed a potential runtime PM
imbalance with how the clocks are handled in the driver.
The clocks are acquired using devres, which ties enablement strictly to the
device lifecycle:
drivers/i3c/master/dw-i3c-master.c:dw_i3c_common_probe() {
...
master->core_clk = devm_clk_get_enabled(&pdev->dev, NULL);
...
master->pclk = devm_clk_get_optional_enabled(&pdev->dev, "pclk");
...
}
However, they are manually disabled during runtime suspend:
drivers/i3c/master/dw-i3c-master.c:dw_i3c_master_runtime_suspend() {
...
dw_i3c_master_disable_clks(master);
...
}
And runtime PM is disabled on removal without waking the device:
drivers/i3c/master/dw-i3c-master.c:dw_i3c_common_remove() {
...
pm_runtime_disable(master->dev);
...
}
If the driver is unbound via sysfs while the device is idle in runtime suspend,
the clocks remain disabled. When the devres actions fire during cleanup, won't
they attempt to disable the clocks a second time?
Could this unbalanced clock disable turn off a shared clock and affect other
active peripherals?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717105829.567522-1-shubhamsanjay.patil@amd.com?part=1
next prev parent reply other threads:[~2026-07-17 11:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 10:58 [PATCH] dt-bindings: i3c: dw: Document missing optional core reset Shubham Patil
2026-07-17 11:10 ` sashiko-bot [this message]
2026-07-17 11:33 ` Krzysztof Kozlowski
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=20260717111042.3C2921F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-i3c@lists.infradead.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shubhamsanjay.patil@amd.com \
/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