From: sashiko-bot@kernel.org
To: "Charan Pedumuru" <charan.pedumuru@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v5] dt-bindings: pwm: st,sti-pwm: convert to DT schema
Date: Mon, 29 Jun 2026 13:31:41 +0000 [thread overview]
Message-ID: <20260629133142.A8B991F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260629-st-pwm-v5-1-a93f2bfec38c@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `clock-names` YAML schema strictly enforces an ordered list starting with `"pwm"`, which improperly rejects valid capture-only configurations.
--
commit c9b4fd6ce8e4e0ebe419750b4c65554ab14080bc
Author: Charan Pedumuru <charan.pedumuru@gmail.com>
dt-bindings: pwm: st,sti-pwm: convert to DT schema
This commit converts the STMicroelectronics STiH41x PWM/Capture controller
binding from a text file to DT schema. It updates the compatible string to
match hardware conventions and drops inherited pinctrl properties from the
required list.
> diff --git a/Documentation/devicetree/bindings/pwm/st,sti-pwm.yaml b/Documentation/devicetree/bindings/pwm/st,sti-pwm.yaml
> new file mode 100644
> index 0000000000000..39f96596c1ef8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/st,sti-pwm.yaml
[ ... ]
> + pinctrl-names:
> + const: default
> +
> + clock-names:
> + minItems: 1
> + items:
> + - const: pwm
> + - const: capture
[Severity: Medium]
Can this rigid sequence for clock-names improperly reject valid capture-only
configurations during schema validation?
The driver selectively fetches clocks based on whether st,pwm-num-chan and
st,capture-num-chan are non-zero. If a hardware variant is configured solely
for input capture, it only needs the "capture" clock.
By defining an items array that starts with a constant of "pwm", the schema
mandates that the first or only clock name must be "pwm". Consequently, a
valid single-clock configuration providing just "capture" will be rejected by
the validation tools.
Would it make sense to use a more flexible schema construct like enum, anyOf,
or oneOf to allow either clock to be specified independently?
> +
> + clocks:
> + minItems: 1
> + maxItems: 2
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260629-st-pwm-v5-1-a93f2bfec38c@gmail.com?part=1
next prev parent reply other threads:[~2026-06-29 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 12:58 [PATCH v5] dt-bindings: pwm: st,sti-pwm: convert to DT schema Charan Pedumuru
2026-06-29 13:31 ` sashiko-bot [this message]
2026-06-30 6:32 ` 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=20260629133142.A8B991F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=charan.pedumuru@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@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