From: sashiko-bot@kernel.org
To: "Otto Pflüger" <otto.pflueger@abscue.de>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/4] dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings
Date: Thu, 21 May 2026 16:52:27 +0000 [thread overview]
Message-ID: <20260521165228.AC8261F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260521-sc2730-regulators-v4-2-1ac8a3b5ed82@abscue.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Removing the unconditional `$ref` for the `regulators` node without adding conditionals for `sprd,sc2720`, `sprd,sc2721`, and `sprd,sc2723` leaves the `regulators` node unvalidated for those compatible strings.
--
commit 0dc1c5ed599d6def6003f8e26bf5f2c7220c8d77
Author: Otto Pflüger <otto.pflueger@abscue.de>
dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings
The SC2730 PMIC provides a different set of regulators from SC2731 and
requires separate regulator bindings. This commit adds conditionals for
sprd,sc2730 and sprd,sc2731 top-level compatibles to ensure the correct
regulator schemas are applied.
> diff --git a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> index b023e1ef8d3cc..39d26b6ab4779 100644
> --- a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> +++ b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> @@ -54,7 +54,6 @@ properties:
>
> regulators:
> type: object
> - $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#
>
> patternProperties:
> "^adc@[0-9a-f]+$":
[ ... ]
> @@ -101,6 +100,26 @@ required:
>
> additionalProperties: false
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: sprd,sc2730
> + then:
> + properties:
> + regulators:
> + $ref: /schemas/regulator/sprd,sc2730-regulator.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: sprd,sc2731
> + then:
> + properties:
> + regulators:
> + $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#
[Severity: Medium]
Does removing the unconditional $ref leave the regulators node unvalidated for
the older compatible strings?
The compatible enum for this schema also includes sprd,sc2720, sprd,sc2721,
and sprd,sc2723. Now that the default $ref has been removed, if one of those
older compatible strings is used, there is no conditional block that applies.
This appears to fall back to an unconstrained type: object schema for those
compatibles, which means invalid or malformed properties within the regulators
node will silently pass dt-binding checks.
Should there be an additional conditional block for these older PMICs to
ensure their regulators are fully validated?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260521-sc2730-regulators-v4-0-1ac8a3b5ed82@abscue.de?part=2
next prev parent reply other threads:[~2026-05-21 16:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 16:17 [PATCH v4 0/4] regulator: Add support for Unisoc SC2730 PMIC regulators Otto Pflüger
2026-05-21 16:17 ` [PATCH v4 1/4] regulator: dt-bindings: Add Unisoc SC2730 PMIC Otto Pflüger
2026-05-22 6:14 ` Krzysztof Kozlowski
2026-05-21 16:17 ` [PATCH v4 2/4] dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings Otto Pflüger
2026-05-21 16:52 ` sashiko-bot [this message]
2026-05-22 6:28 ` Krzysztof Kozlowski
2026-05-22 6:32 ` Otto Pflüger
2026-05-22 7:06 ` Krzysztof Kozlowski
2026-05-21 16:17 ` [PATCH v4 3/4] mfd: sprd-sc27xx: Add SC2730 regulator cell Otto Pflüger
2026-05-21 17:33 ` sashiko-bot
2026-05-21 16:17 ` [PATCH v4 4/4] regulator: Add regulator driver for Unisoc SC2730 PMIC Otto Pflüger
2026-05-21 17:57 ` sashiko-bot
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=20260521165228.AC8261F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=otto.pflueger@abscue.de \
--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