From: Ronald Claveau <linux-kernel-dev@aliel.fr>
To: sashiko-reviews@lists.linux.dev
Cc: neil.armstrong@linaro.org, conor+dt@kernel.org,
linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org,
robh@kernel.org
Subject: Re: [PATCH v3 1/3] dt-bindings: pwm: amlogic: Add core clock for S4 like
Date: Sun, 27 Sep 2026 17:14:17 +0200 [thread overview]
Message-ID: <c93092bb-e3f7-462f-aa8f-a09dbb2946e9@aliel.fr> (raw)
In-Reply-To: <20260927143733.DA8151F000FF@smtp.kernel.org>
On 9/27/26 4:37 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] dt-bindings: pwm-amlogic: missing minItems allows validation bypass
> --
>
> commit 359e122eac15df570817ba590b91f8958522a038
> Author: Ronald Claveau <linux-kernel-dev@aliel.fr>
>
> dt-bindings: pwm: amlogic: Add core clock for S4 like
>
> This commit adds a third system core clock to the Amlogic PWM controller
> bindings for S4 and related devices. It updates the conditionals for the
> S4 compatible string to require three clocks instead of two, and updates
> the examples to match.
>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml
>> index c337d85da40f1..e9cd5f1fdf264 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml
>
> [ ... ]
>
>> @@ -143,9 +143,15 @@ allOf:
>> items:
>> - description: input clock of PWM channel A
>> - description: input clock of PWM channel B
>> - clock-names: false
>> + - description: gate clock for the PWM controller
>
> [Severity: Medium]
> Will dt-schema successfully enforce the minimum 3 items requirement intended
> by the commit message?
>
> Because the global `clocks` property definition has `minItems: 1` and JSON
> Schema's `items` keyword only validates elements that are actually present, a
> device tree node with `compatible = "amlogic,meson-s4-pwm"` and only 1 or 2
> clocks will silently pass validation.
>
> Does this block need an explicit `minItems: 3`?
>
If I remove one clock, the validation fails
```
CHKDT ./Documentation/devicetree/bindings
LINT ./Documentation/devicetree/bindings
STYLE ./Documentation/devicetree/bindings
DTEX Documentation/devicetree/bindings/pwm/pwm-amlogic.example.dts
DTC [C]
Documentation/devicetree/bindings/thermal/amlogic,thermal.example.dtb
DTC [C] Documentation/devicetree/bindings/pwm/pwm-amlogic.example.dtb
/home/*redacted*/linux/Documentation/devicetree/bindings/pwm/pwm-amlogic.example.dtb:
pwm@1000 (amlogic,meson-s4-pwm): clock-names: ['channel-a', 'channel-b']
is too short
from schema $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml
/home/*redacted*/linux/Documentation/devicetree/bindings/pwm/pwm-amlogic.example.dtb:
pwm@1000 (amlogic,meson-s4-pwm): clocks: [[4294967295], [4294967295]] is
too short
from schema $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml
/home/*redacted*/linux/Documentation/devicetree/bindings/pwm/pwm-amlogic.example.dtb:
pwm@60000 (amlogic,t7-pwm): clock-names: ['channel-a', 'channel-b'] is
too short
from schema $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml
/home/*redacted*/linux/Documentation/devicetree/bindings/pwm/pwm-amlogic.example.dtb:
pwm@60000 (amlogic,t7-pwm): clocks: [[4294967295], [4294967295]] is too
short
from schema $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml
```
>> + clock-names:
>> + items:
>> + - const: channel-a
>> + - const: channel-b
>> + - const: core
>
> [Severity: Medium]
> Does this also require `minItems: 3`?
>
> Supplying just "channel-a" and "channel-b" will still validate successfully
> without a `minItems` constraint here.
>
>> required:
>> - clocks
>> + - clock-names
>
--
Best regards,
Ronald
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-09-27 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 14:28 [PATCH v3 0/3] Add T7 PWM core clock support Ronald Claveau via B4 Relay
2026-09-27 14:28 ` [PATCH v3 1/3] dt-bindings: pwm: amlogic: Add core clock for S4 like Ronald Claveau via B4 Relay
2026-09-27 14:37 ` sashiko-bot
2026-09-27 15:14 ` Ronald Claveau [this message]
2026-09-28 16:46 ` Conor Dooley
2026-09-27 14:28 ` [PATCH v3 2/3] pwm: meson: Add optional core clock for S4 PWM Ronald Claveau via B4 Relay
2026-09-27 14:28 ` [PATCH v3 3/3] arm64: dts: amlogic: a1-c3-s4-t7: Add core clock to PWM controller nodes Ronald Claveau 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=c93092bb-e3f7-462f-aa8f-a09dbb2946e9@aliel.fr \
--to=linux-kernel-dev@aliel.fr \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=neil.armstrong@linaro.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
all inboxes | Powered by JetHome®