Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Udaya Kiran Challa" <challauday369@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4] dt-bindings: clock: via,vt8500: Convert to DT Schema
Date: Sun, 24 May 2026 15:23:12 +0000	[thread overview]
Message-ID: <20260524152312.C741E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260524151110.21277-1-challauday369@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The `patternProperties` regex enforces strictly lowercase node names, inadvertently rejecting standard `fixed-clock` nodes unless they violate DT naming conventions by including uppercase letters to bypass validation.
- [Medium] The patch defines a new schema for `via,vt8500-pmc` but fails to delete the existing legacy text binding for the same compatible string.
- [Low] The `divisor-mask` property lacks a `dependentRequired` constraint to enforce that it can only be used when `divisor-reg` is also present.
--

commit f63cd62ab71a54ca61f786bce852286bf98a7852
Author: Udaya Kiran Challa <challauday369@gmail.com>

dt-bindings: clock: via,vt8500: Convert to DT Schema
    
Convert the VIA/Wondermedia VT8500 and Wondermedia WM8xxx series SoCs clock
controller binding from the legacy text format to DT schema.

> diff --git a/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml b/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml
> new file mode 100644
> index 0000000000000..51a68df6c2f30
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml

[Severity: Medium]
Should this patch also delete the existing text binding for this compatible
located at Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt?
Leaving the old text binding intact causes duplicate and fragmented
documentation for the exact same compatible string.

[ ... ]
> +    patternProperties:
> +      "^[a-z0-9-]+(@[0-9a-f]+)?$":
> +        type: object
> +
> +        properties:
> +          compatible:
> +            enum:
> +              - via,vt8500-pll-clock
> +              - wm,wm8650-pll-clock
> +              - wm,wm8750-pll-clock
> +              - wm,wm8850-pll-clock
> +              - via,vt8500-device-clock

[Severity: High]
Does this regex unintentionally restrict compliant lowercase node names?

Any standard child node with a compliant lowercase name (like "ref24") will
match this pattern and be strictly restricted to the compatibles above, failing
if it contains properties like clock-frequency.

It appears the fixed-clock examples in this patch only pass validation because
their node names include uppercase letters (e.g., "ref24M"), which evades the
regex entirely and falls through to additionalProperties.

[ ... ]
> +          divisor-reg:
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +            description:
> +              Offset of the clock divisor register within the PMC
> +              register space.
> +
> +          divisor-mask:
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +            default: 0x1f
> +            description:
> +              Bitmask describing the divisor field inside divisor-reg.
> +
> +        dependentRequired:
> +          enable-reg:
> +            - enable-bit
> +
> +          enable-bit:
> +            - enable-reg

[Severity: Low]
Should this section also include a constraint to enforce that divisor-mask
can only be used when divisor-reg is present? The legacy text binding indicates
the mask is semantically tied to the divisor register.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260524151110.21277-1-challauday369@gmail.com?part=1

  reply	other threads:[~2026-05-24 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-24 15:10 [PATCH v4] dt-bindings: clock: via,vt8500: Convert to DT Schema Udaya Kiran Challa
2026-05-24 15:23 ` sashiko-bot [this message]
2026-05-30  7:35 ` Krzysztof Kozlowski
2026-05-31 16:49   ` Uday Kiran
2026-06-01 11:44     ` 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=20260524152312.C741E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=challauday369@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