From: sashiko-bot@kernel.org
To: "Luna Hart" <lhart.opensource@witekio.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: hwmon: Add TI TPS389004/TPS389006/TPS389008
Date: Tue, 29 Sep 2026 23:17:56 +0000 [thread overview]
Message-ID: <20260929231757.5B97D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260929-lhart-dev-tps38900x-v1-1-7045c5894152@witekio.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: silent schema validation bypass due to invalid compatible match
--
commit 6f785a9cad4f5ba27f5d71565ba1ca2b776da113
Author: Luna Hart <lhart.opensource@witekio.com>
dt-bindings: hwmon: Add TI TPS389004/TPS389006/TPS389008
Add a binding for the TI TPS389004, TPS389006, and TPS389008 I2C voltage
supervisors and monitors, which provide 4, 6, and 8 voltage inputs
respectively. Each input may be described by an optional child node,
containing additional properties including the label and ADC scaling factor.
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tps38900x.yaml b/Documentation/devicetree/bindings/hwmon/ti,tps38900x.yaml
> new file mode 100644
> index 0000000000000..cdd74ddd03e74
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tps38900x.yaml
[ ... ]
> +allOf:
> + - if:
> + properties:
> + compatible:
> + const: ti,tps389004
[Severity: Medium]
Will this properly evaluate the compatible property?
In device tree bindings, dt-schema evaluates the compatible property as an
array of strings (for example, ["ti,tps389004"]). The const keyword strictly
checks for exact equivalence. Since a scalar string is not equivalent to an
array, this if condition will always evaluate to false.
Because of this, the hardware-specific constraints in the then block
restricting out-of-bounds voltage channels for the 4-channel variant are never
applied, allowing invalid configurations to silently pass dt_binding_check.
Should this use contains: const: ti,tps389004 instead?
> + then:
> + patternProperties:
> + "^vmon@[4-7]$": false
> +
> + - if:
> + properties:
> + compatible:
> + const: ti,tps389006
[Severity: Medium]
Is this block also affected by the same array matching syntax issue?
Just like the 4-channel variant above, this condition will fail to match the
compatible array, bypassing the channel restrictions for the TPS389006.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260929-lhart-dev-tps38900x-v1-0-7045c5894152@witekio.com?part=1
next prev parent reply other threads:[~2026-09-29 23:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 23:04 [PATCH 0/2] hwmon: Add support for TI TPS389004/TPS389006/TPS389008 Luna Hart via B4 Relay
2026-09-29 23:04 ` [PATCH 1/2] dt-bindings: hwmon: Add " Luna Hart via B4 Relay
2026-09-29 23:17 ` sashiko-bot [this message]
2026-09-30 23:28 ` Luna HART
2026-10-01 8:17 ` Krzysztof Kozlowski
2026-10-01 8:17 ` Krzysztof Kozlowski
2026-10-02 23:57 ` Luna Hart
2026-09-29 23:04 ` [PATCH 2/2] hwmon: (tps38900x) Add driver for " Luna Hart via B4 Relay
2026-09-29 23:14 ` sashiko-bot
2026-10-01 8:19 ` Krzysztof Kozlowski
2026-10-03 0:13 ` Luna Hart
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=20260929231757.5B97D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lhart.opensource@witekio.com \
--cc=linux-hwmon@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