[PATCH v3 1/3] dt-bindings: pwm: amlogic: Add core clock for S4 like

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sun Sep 27 07:37:33 PDT 2026


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 at 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`?

> +        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

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260927-add-t7-sys-pwm-clk-v3-0-18d66abea4d1@aliel.fr?part=1



More information about the linux-amlogic mailing list