Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vyacheslav Yurkov" <V.Yurkov.EXT@bruker.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v11 1/2] dt-bindings: clock: Add gpio-enabled-clock
Date: Sat, 21 Nov 2026 13:40:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-227078@kernel.org> (raw)
In-Reply-To: <20261121-feature-clock-guard-v11-1-00c633a667a2@bruker.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: clock: poll-timeout-us encodes software policy
  and bounds
- [Low] dt-bindings: clock: clock-output-names required for
  single-output clock
- [Low] dt-bindings: clock: inconsistent property order in
  gpio-enabled-clock
--

commit 4240011b2e1aa7ee82ec94b5068bdebeb6cd0095
Author: Vyacheslav Yurkov <V.Yurkov.EXT@bruker.com>

dt-bindings: clock: Add gpio-enabled-clock

This commit adds a Devicetree binding schema for a clock that passes its
parent rate through unchanged and reports its enabled state via a GPIO.

> diff --git a/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml
> new file mode 100644
> index 0000000000000..4861c87ae5e0d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml
> @@ -0,0 +1,55 @@
[ ... ]
> +properties:
> +  compatible:
> +    const: gpio-enabled-clock
> +
> +  clocks:
> +    maxItems: 1
> +
> +  "#clock-cells":
> +    const: 0
> +
> +  clock-output-names:
> +    maxItems: 1
> +
> +  enabled-gpios:
> +    description: GPIO that indicates whether the clock is enabled or disabled.
> +    maxItems: 1
> +
> +  poll-timeout-us:
> +    description: Timeout in microseconds for waiting for a GPIO signal.
> +    default: 10
> +    minimum: 10
> +    maximum: 1000

[Severity: Medium]
Does poll-timeout-us encode OS driver polling policy rather than a
hardware property?  How long software polls a GPIO (as opposed to waiting
on an interrupt or describing a hardware stabilization time) is a driver
detail, and the 10 to 1000 us bounds prevent clock sources with lock
times outside that window from passing schema validation.

Also, requiring a parent clocks phandle on a separate pass-through node
forces a single clock generator with a status or lock GPIO to be split
across two Devicetree nodes.

> +
> +required:
> +  - compatible
> +  - "#clock-cells"
> +  - clocks
> +  - clock-output-names
> +  - enabled-gpios

[Severity: Low]
Should clock-output-names be optional here?  Because #clock-cells is 0,
this node provides a single clock output that consumers reference
directly by phandle, and sibling single-output clock bindings leave
clock-output-names optional so the clock name can default to the node
name.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    clock {
> +        compatible = "gpio-enabled-clock";
> +        #clock-cells = <0>;
> +        clocks = <&pll>;

[Severity: Low]
This isn't a bug, but properties lists clocks before #clock-cells, while
required and the example node list #clock-cells before clocks.  Keeping
clocks before #clock-cells across all three sections matches canonical
property ordering and sibling bindings such as gpio-gate-clock.yaml.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261121-feature-clock-guard-v11-0-00c633a667a2@bruker.com?part=1

  reply	other threads:[~2026-11-21 13:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 13:29 [PATCH v11 0/2] A proposal to add a gpio-enabled clock driver Vyacheslav Yurkov via B4 Relay
2026-11-21 13:29 ` [PATCH v11 1/2] dt-bindings: clock: Add gpio-enabled-clock Vyacheslav Yurkov via B4 Relay
2026-11-21 13:40   ` sashiko-bot [this message]
2026-11-21 13:29 ` [PATCH v11 2/2] clk: gpio: Add driver for GPIO-signalled clocks Vyacheslav Yurkov 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=sashiko-outbox-227078@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