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 v10 1/2] dt-bindings: clock: Add gpio-enabled-clock
Date: Sat, 21 Nov 2026 13:24:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-227069@kernel.org> (raw)
In-Reply-To: <20261121-feature-clock-guard-v10-1-5d449739bb8c@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 af456b3694509e900f2e04e650b48e34c1d34c06
Author: Vyacheslav Yurkov <V.Yurkov.EXT@bruker.com>

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

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

> 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..76c1425931d28
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/gpio-enabled-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: GPIO Enabled Clock
> +
> +maintainers:
> +  - Vyacheslav Yurkov <V.Yurkov.EXT@bruker.com>
> +
> +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 a consumer polls a GPIO (as opposed to
waiting on a GPIO interrupt or describing a hardware lock or startup
time) is software policy, and bounding it to 10..1000 us rejects
hardware clocks and PLLs whose stabilization time falls outside that
window.

Also, should the status GPIO be described directly on the clock provider
node rather than requiring a parent clocks property on a separate
pass-through wrapper node?  Modelling this as a wrapper forces a single
hardware clock source with a lock GPIO to be split across two Device
Tree nodes.

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

[Severity: Low]
Should clock-output-names be optional here?  Because #clock-cells is 0,
consumers reference this single-output clock provider directly by
phandle and the clock name can fall back to the Device Tree node name,
matching other single-output clock bindings such as fixed-clock.yaml and
gpio-gate-clock.yaml.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    clock {
> +        compatible = "gpio-enabled-clock";
> +        #clock-cells = <0>;
> +        clocks = <&pll>;
> +        clock-output-names = "gpio-enabled-clock";
> +        enabled-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
> +        poll-timeout-us = <20>;
> +    };

[Severity: Low]
This isn't a bug, but the property order differs across properties,
required, and examples: required lists enabled-gpios before
clock-output-names, while the example lists #clock-cells before clocks.

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

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

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