All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vyacheslav Yurkov" <V.Yurkov.EXT@bruker.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org,
	linux-clk@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: clock: gpio-gate-clock: Add a new compatible string
Date: Tue, 15 Sep 2026 09:36:02 +0000	[thread overview]
Message-ID: <20260915093603.4D2F31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915-feature-clock-guard-v5-1-42ab5dc3a6aa@bruker.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] dt-bindings: clock: locked-gpios maxItems contradicts commit message
- [Low] dt-bindings: clock: schema does not enforce mutually exclusive GPIO properties
- [Low] dt-bindings: clock: example node name uses invalid underscore character
--

commit 79ea3ad838118b16ee842ed66488a42eefcd7f13
Author: Vyacheslav Yurkov <V.Yurkov.EXT@bruker.com>

dt-bindings: clock: gpio-gate-clock: Add a new compatible string

Extend the binding to support a gpio-locked-fixed-clock. This provides a
fixed-rate clock whose availability depends on one or more GPIO lock-status
signals.

> diff --git a/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> index d09d0e3f0c6ec..00cf2ad66dd01 100644
> --- a/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
> +++ b/Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml

[ ... ]

> @@ -23,10 +25,29 @@ properties:
>      description: GPIO reference for enabling and disabling the clock.
>      maxItems: 1
>  
> +  locked-gpios:
> +    description: GPIO that indicates whether the clock is enabled or disabled.
> +    maxItems: 1

[Severity: Medium]
The commit message states that the clock's availability depends on "one or
more GPIO lock-status signals".

Looking at the schema definition, the locked-gpios property is strictly
restricted to exactly one item via maxItems: 1.

Does this maxItems constraint need to be increased to support multiple signals,
or should the commit message be updated to reflect that only a single GPIO is
supported?

> +
>  required:
>    - compatible
>    - '#clock-cells'
> -  - enable-gpios
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          const: gpio-gate-clock
> +    then:
> +      required:
> +        - enable-gpios

[Severity: Low]
Since additionalProperties: false only enforces that properties must be
defined in the top-level properties block, both enable-gpios and locked-gpios
are now allowed for any compatible matching this file.

Should this conditional block explicitly reject locked-gpios by setting it
to false? Without this, a device tree node with compatible = "gpio-gate-clock"
can include locked-gpios and inappropriately pass schema validation.

> +  - if:
> +      properties:
> +        compatible:
> +          const: gpio-locked-fixed-clock
> +    then:
> +      required:
> +        - locked-gpios

[ ... ]

> @@ -40,3 +61,10 @@ examples:
>          #clock-cells = <0>;
>          enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
>      };
> +
> +    clk_gpio_locked {
> +        compatible = "gpio-locked-fixed-clock";

[Severity: Low]
Does this example node name need to be updated to use a hyphen instead of an
underscore?

Device tree node names should ideally use hyphens and a generic class name
like clock. Using an underscore violates device tree naming conventions and
will likely trigger a node_name_chars_strict warning during compilation.

> +        #clock-cells = <0>;
> +        clocks = <&pll>;
> +        locked-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
> +    };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915-feature-clock-guard-v5-0-42ab5dc3a6aa@bruker.com?part=1

  reply	other threads:[~2026-09-15  9:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  9:27 [PATCH v5 0/2] A proposal to add a gpio-locked fixed clock driver Vyacheslav Yurkov
2026-09-15  9:27 ` Vyacheslav Yurkov via B4 Relay
2026-09-15  9:27 ` [PATCH v5 1/2] dt-bindings: clock: gpio-gate-clock: Add a new compatible string Vyacheslav Yurkov
2026-09-15  9:27   ` Vyacheslav Yurkov via B4 Relay
2026-09-15  9:36   ` sashiko-bot [this message]
2026-09-15 16:35   ` Conor Dooley
2026-09-15  9:27 ` [PATCH v5 2/2] clk: Add gpio-locked fixed clock driver Vyacheslav Yurkov
2026-09-15  9:27   ` Vyacheslav Yurkov via B4 Relay
2026-09-15  9:37   ` sashiko-bot
2026-09-15 10:09   ` Jerome Brunet
2026-09-15 13:58     ` Vyacheslav Yurkov
2026-09-16 13:57       ` Jerome Brunet
2026-09-17 17:05         ` Vyacheslav Yurkov
2026-09-25 11:57           ` Jerome Brunet
2026-09-25 13:15             ` Vyacheslav Yurkov
2026-09-25 14:22               ` Jerome Brunet

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=20260915093603.4D2F31F000FF@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 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.