All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bhargav Joshi" <j.bhargav.u@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] regulator: dt-bindigs: ti,pbias-omap: Convert to DT schema
Date: Fri, 17 Jul 2026 18:15:43 +0000	[thread overview]
Message-ID: <20260717181543.B5FA61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260717-ti-pbias-omap-v1-1-527848131801@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Top-level `$ref: regulator.yaml#` incorrectly applies standard regulator constraints to the parent container node.
- [Medium] The schema incorrectly uses `oneOf` to restrict the parent node to exactly one regulator subnode, which prevents valid configurations like OMAP3 from defining both MMC and SIM regulators.
--

--- Patch [1]: [PATCH] regulator: dt-bindigs: ti,pbias-omap: Convert to DT schema ---
commit e24c9bc6e58ceda1b221ec8e8ce86f428408d847
Author: Bhargav Joshi <j.bhargav.u@gmail.com>

regulator: dt-bindigs: ti,pbias-omap: Convert to DT schema

Convert Texas Instruments PBIAS internal regulator from text to DT
schema. No Functional changes are introduced.

> diff --git a/Documentation/devicetree/bindings/regulator/ti,pbias-omap.yaml b/Documentation/devicetree/bindings/regulator/ti,pbias-omap.yaml
> new file mode 100644
> index 0000000000000..61a4dc87c48c9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/ti,pbias-omap.yaml

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - syscon
> +
> +oneOf:
> +  - required:
> +      - pbias_mmc_omap2430
> +  - required:
> +      - pbias_sim_omap3
> +  - required:
> +      - pbias_mmc_omap4
> +  - required:
> +      - pbias_mmc_omap5

[Severity: Medium]
Will this reject valid configurations that define more than one child
regulator?

The JSON schema oneOf keyword requires exactly one condition to match. Since
OMAP3 SoCs can have both MMC and SIM PBIAS regulators, and the driver
supports them concurrently, having both defined would cause oneOf to fail.
Should this use anyOf instead?

> +
> +allOf:
> +  - $ref: regulator.yaml#

[Severity: Medium]
Does applying the standard regulator schema to the top-level parent node
neutralize validation?

This allows a device tree author to mistakenly place properties like
regulator-min-microvolt directly on the parent node instead of the
subnodes. Such properties would be ignored by the kernel but silently pass
the schema check.

> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - ti,pbias-omap2
> +    then:
> +      required:
> +        - pbias_mmc_omap2430
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: ti,pbias-omap3
> +    then:
> +      oneOf:
> +        - required:
> +            - pbias_mmc_omap2430
> +        - required:
> +            - pbias_sim_omap3

[Severity: Medium]
Similarly, does this restrict OMAP3 to exactly one regulator subnode? 

This would prevent valid hardware configurations from using both the MMC and
SIM regulators simultaneously. Should this also use anyOf?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260717-ti-pbias-omap-v1-1-527848131801@gmail.com?part=1

      reply	other threads:[~2026-07-17 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 18:06 [PATCH] regulator: dt-bindigs: ti,pbias-omap: Convert to DT schema Bhargav Joshi
2026-07-17 18:15 ` sashiko-bot [this message]

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=20260717181543.B5FA61F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j.bhargav.u@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.