Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Otto Pflüger" <otto.pflueger@abscue.de>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/3] dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings
Date: Tue, 19 May 2026 12:30:57 +0000	[thread overview]
Message-ID: <20260519123058.318F3C2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260519-sc2730-regulators-v3-2-5bf0e02507e3@abscue.de>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The newly referenced `sprd,sc2730-regulator.yaml` schema contains a critical bug that causes it to falsely reject valid device tree nodes.
- [Medium] Unconditional relaxation of the `regulators` node schema permits incorrect hardware configurations to silently pass validation.
--

commit 0ef24a84813b14435877f202403f8d49b85173ac
Author: Otto Pflüger <otto.pflueger@abscue.de>

dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings

This commit updates the SC2731 MFD binding to allow using the SC2730
regulator bindings for the regulators node. The SC2730 PMIC provides a
different set of regulators than the SC2731.

> diff --git a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> index b023e1ef8d3cc..e74ec49709941 100644
> --- a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> +++ b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> @@ -54,7 +54,9 @@ properties:
>  
>    regulators:
>      type: object
> -    $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#
> +    oneOf:
> +      - $ref: /schemas/regulator/sprd,sc2730-regulator.yaml#

Does the newly referenced sprd,sc2730-regulator.yaml schema contain an
issue that causes it to falsely reject valid device tree nodes?

This issue appears to be introduced by the preceding patch in the series
(commit "regulator: dt-bindings: Add Unisoc SC2730 PMIC") but manifests
here because this commit adds the reference to the broken schema.

The sprd,sc2730-regulator.yaml file specifies "required: [compatible]"
and "additionalProperties: false", but entirely omits the properties block
necessary to define the compatible property.

Because dt-schema rules forbid any property not explicitly defined when
"additionalProperties: false" is set, it seems any device tree node
defining an SC2730 regulator node will instantly fail dtbs_check for
containing an additional property named compatible.

Does this unconditional oneOf block permit incorrect hardware configurations
to silently pass validation?

This change replaces a single $ref for the regulators node with an
unconditional oneOf block. This allows any PMIC compatible string
supported by this MFD binding to legally declare either the SC2730 or
SC2731 regulator bindings.

Because the commit message correctly notes that the SC2730 provides a
different set of regulators, should the schema strictly associate the
regulator binding with the corresponding top-level PMIC compatible string?

This could be implemented using an allOf list of if-then conditional blocks
that evaluate the parent node's compatible string to selectively apply the
correct $ref to the regulators node, preventing cross-generational hardware
mismatches from silently passing validation.

> +      - $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260519-sc2730-regulators-v3-0-5bf0e02507e3@abscue.de?part=2

  reply	other threads:[~2026-05-19 12:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 12:06 [PATCH v3 0/3] regulator: Add support for Unisoc SC2730 PMIC regulators Otto Pflüger
2026-05-19 12:06 ` [PATCH v3 1/3] regulator: dt-bindings: Add Unisoc SC2730 PMIC Otto Pflüger
2026-05-19 12:18   ` sashiko-bot
2026-05-19 17:28   ` Conor Dooley
2026-05-20  7:23     ` Krzysztof Kozlowski
2026-05-19 12:06 ` [PATCH v3 2/3] dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings Otto Pflüger
2026-05-19 12:30   ` sashiko-bot [this message]
2026-05-19 12:06 ` [PATCH v3 3/3] regulator: Add regulator driver for Unisoc SC2730 PMIC Otto Pflüger
2026-05-19 12:54   ` sashiko-bot
2026-05-20 15:48   ` Mark Brown

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=20260519123058.318F3C2BCB3@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