From: sashiko-bot@kernel.org
To: "Vyacheslav Yurkov" <V.Yurkov.EXT@bruker.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org,
linux-clk@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 1/2] dt-bindings: clock: gpio-gate-clock: Add a new compatible string
Date: Sun, 27 Sep 2026 14:08:29 +0000 [thread overview]
Message-ID: <20260927140829.F378D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260927-feature-clock-guard-v7-1-8dd19568d9a2@bruker.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] dt-bindings: commit message and compatible string mismatch
- [Low] dt-bindings: incomplete conditional validation of mutually exclusive properties
- [Low] dt-bindings: non-generic node name in example
--
commit 91b1494a8737e6c880936e93a4ab375dedf59e96
Author: Vyacheslav Yurkov <V.Yurkov.EXT@bruker.com>
dt-bindings: clock: gpio-gate-clock: Add a new compatible string
The patch extends the binding to support a new clock provider that exposes a
fixed-rate clock whose availability depends on GPIO lock-status signals. It
updates the yaml to include properties for this new type of clock.
> dt-bindings: clock: gpio-gate-clock: Add a new compatible string
>
> Extend the binding to be used also for gpio-locked-fixed-clock.
> A GPIO-locked fixed clock provider exposes a fixed-rate clock whose
[Severity: Medium]
This isn't a bug, but there is a mismatch between the commit message and the
implementation. The commit message explicitly states it extends the binding
for "gpio-locked-fixed-clock", but the added compatible string in the yaml
is "gpio-locked-clock". Could the commit message or the compatible string be
updated to match?
> diff --git a/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> index d09d0e3f0c6ec..1ad87c8b36b9f 100644
> --- a/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> +++ b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
[ ... ]
> required:
> - compatible
> - '#clock-cells'
> - - enable-gpios
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + const: gpio-gate-clock
> + then:
> + required:
> + - enable-gpios
> + - if:
> + properties:
> + compatible:
> + const: gpio-locked-clock
> + then:
> + required:
> + - enabled-gpios
[Severity: Low]
Does this schema sufficiently restrict invalid property combinations?
By defining "enabled-gpios" globally, "additionalProperties: false" no longer
rejects it for the original "gpio-gate-clock" compatible. Since the mutually
exclusive properties are not explicitly forbidden in the conditional blocks, a
device tree containing compatible = "gpio-gate-clock" and an erroneously added
"enabled-gpios" property will silently pass schema validation.
Should these blocks forbid the mutually exclusive properties (e.g., using
enabled-gpios: false for gpio-gate-clock)?
> additionalProperties: false
>
> @@ -40,3 +61,10 @@ examples:
> #clock-cells = <0>;
> enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
> };
> +
> + clk_gpio_locked {
> + compatible = "gpio-locked-clock";
> + #clock-cells = <0>;
> + clocks = <&pll>;
> + enabled-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
> + };
[Severity: Low]
Does this example violate the standard Device Tree naming conventions?
The node name "clk_gpio_locked" is non-generic and contains underscores.
Should this use a generic node name describing the device function (like
"clock" or "clock-xxx") to avoid introducing an anti-pattern that users may
copy-paste and generate dtc warnings?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260927-feature-clock-guard-v7-0-8dd19568d9a2@bruker.com?part=1
next prev parent reply other threads:[~2026-09-27 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 13:59 [PATCH v7 0/2] A proposal to add a gpio-locked clock driver Vyacheslav Yurkov via B4 Relay
2026-09-27 14:00 ` [PATCH v7 1/2] dt-bindings: clock: gpio-gate-clock: Add a new compatible string Vyacheslav Yurkov via B4 Relay
2026-09-27 14:08 ` sashiko-bot [this message]
2026-09-28 16:48 ` Conor Dooley
2026-09-27 14:00 ` [PATCH v7 2/2] clk: Add gpio-locked clock driver Vyacheslav Yurkov via B4 Relay
2026-09-27 14:07 ` sashiko-bot
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=20260927140829.F378D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=V.Yurkov.EXT@bruker.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.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