From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property
Date: Sun, 20 Sep 2026 14:43:15 +0000 [thread overview]
Message-ID: <20260920144315.C75E11F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260920-fix-tcpm-vbus-bis-v1-2-cc9347bbe81a@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: incomplete oneOf constraint allows omitting VBUS supply
--
commit 3178bc24ea3cc08021dfdd40f7987789b23a49de
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property
The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate
device-specific VBUS") switched the schema to use generic vbus-supply
property, however the example continued to use the old, deprecated one.
Update example to use the expected style of specifying the VBUS.
> diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> index db487562cec49..dd56dc8afe032 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
> @@ -176,7 +176,6 @@ examples:
[ ... ]
> - vdd-vbus-supply = <&pm8150b_vbus>;
> vdd-pdphy-supply = <&vreg_l2a_3p1>;
>
> connector {
> @@ -186,6 +185,8 @@ examples:
> data-role = "dual";
> self-powered;
>
> + vbus-supply = <&pm8150b_vbus>;
[Severity: Medium]
Does the schema properly enforce that one of the VBUS sources is provided?
Looking at the oneOf constraint defined in this file:
Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml:oneOf
- required:
- vdd-vbus-supply
- properties:
connector:
required:
- vbus-supply
If a device tree node misses both vdd-vbus-supply and the connector node, it
fails the first branch but trivially passes the second branch. This happens
because the properties keyword only applies constraints to properties actually
present in the instance.
Since exactly one branch passes, the overall oneOf constraint evaluates to true,
silently accepting incomplete configurations and defeating the purpose of
requiring one of the VBUS sources.
Should the second branch also require the connector node to be present to
ensure the constraint works as intended?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260920-fix-tcpm-vbus-bis-v1-0-cc9347bbe81a@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-09-20 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 14:37 [PATCH 0/2] dt-bindings: usb: qcom,pmic-typec: two small fixes Dmitry Baryshkov
2026-09-20 14:37 ` [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources Dmitry Baryshkov
2026-09-20 14:44 ` sashiko-bot
2026-09-20 21:22 ` Bryan O'Donoghue
2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov
2026-09-20 14:43 ` sashiko-bot [this message]
2026-09-20 21:21 ` Bryan O'Donoghue
2026-09-24 13:01 ` 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=20260920144315.C75E11F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox