From: sashiko-bot@kernel.org
To: "Alexandre MINETTE via B4 Relay"
<devnull+contact.alex-min.fr@kernel.org>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
Date: Tue, 19 May 2026 07:42:47 +0000 [thread overview]
Message-ID: <20260519074247.C5643C2BCC6@smtp.kernel.org> (raw)
In-Reply-To: <20260519-mainline-send-v1-sending-v3-2-3dd7aa125353@alex-min.fr>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The parent PMIC schema (`qcom-pm8xxx.yaml`) is not updated to allow the new `qcom,pm8921-misc` child node, causing validation errors for any DT using it.
- [High] The `if` condition uses `const: qcom,pm8941-misc` instead of `contains: const: qcom,pm8941-misc` for the `compatible` property, inadvertently making `reg` optional for `qcom,pm8941-misc` devices.
- [Medium] The schema allows `qcom,pm8921-misc` devices to have a `reg` property, even though the hardware variant does not use a register resource.
--
commit 8b3e7ba33de64864005f6ce3e91467d662e5662d
Author: Alexandre MINETTE <contact@alex-min.fr>
dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible
This commit adds the qcom,pm8921-misc compatible string to the PMIC USB
ID Extcon binding. It makes the reg property optional since the downstream
PM8xxx misc device does not use a register resource.
> The device is modeled as a child of the SSBI-connected PM8921 PMIC.
> Unlike PM8941, the downstream PM8xxx misc device is not instantiated with
> a register resource for this path, and the mainline extcon driver only
> needs the named USB ID interrupt. Allow qcom,pm8921-misc without requiring
> reg.
The parent schema (qcom-pm8xxx.yaml) enforces additionalProperties: false
and strictly defines permitted children via patternProperties.
Without an update to the parent schema, will device trees including the
qcom,pm8921-misc node fail dt_binding_check?
> diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> index 6b80518cbf629..4e3d0aadb83cc 100644
> --- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> +++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
[ ... ]
> @@ -37,10 +38,18 @@ properties:
> - const: usb_vbus
> required:
> - compatible
> - - reg
> - interrupts
> - interrupt-names
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + const: qcom,pm8941-misc
Devicetree schemas evaluate the compatible property as an array of strings.
Because comparing an array to a scalar string always evaluates to false,
this condition will never match, and the reg property will silently stop
being enforced for qcom,pm8941-misc devices.
Should this condition use "contains: const: qcom,pm8941-misc" instead?
> + then:
> + required:
> + - reg
Even though reg is no longer globally required, the global properties block
still defines it. This means the schema will silently accept a bogus reg
property for qcom,pm8921-misc without an explicit disallowance.
Since the PM8921 variant is not instantiated with a register resource,
should this block include an "else" clause specifying "reg: false"?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260519-mainline-send-v1-sending-v3-0-3dd7aa125353@alex-min.fr?part=2
next prev parent reply other threads:[~2026-05-19 7:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 7:16 [PATCH v3 0/8] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-05-19 7:16 ` [PATCH v3 1/8] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-05-19 7:16 ` [PATCH v3 2/8] dt-bindings: extcon: qcom,pm8941-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
2026-05-19 7:42 ` sashiko-bot [this message]
2026-05-19 7:16 ` [PATCH v3 3/8] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
2026-05-19 8:12 ` sashiko-bot
2026-05-19 8:31 ` Linus Walleij
2026-05-19 8:48 ` MINETTE Alexandre
2026-05-19 21:03 ` David Heidelberg
2026-05-19 7:16 ` [PATCH v3 4/8] iommu/msm: Look up masters per IOMMU instance Alexandre MINETTE via B4 Relay
2026-05-19 8:43 ` sashiko-bot
2026-05-19 7:16 ` [PATCH v3 5/8] extcon: qcom-spmi-misc: Add PM8921 compatible Alexandre MINETTE via B4 Relay
2026-05-19 9:05 ` sashiko-bot
2026-05-19 7:16 ` [PATCH v3 6/8] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
2026-05-19 9:25 ` sashiko-bot
2026-05-19 7:16 ` [PATCH v3 7/8] ARM: dts: qcom: pm8921: Add USB ID extcon Alexandre MINETTE via B4 Relay
2026-05-19 9:41 ` sashiko-bot
2026-05-19 7:16 ` [PATCH v3 8/8] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-05-19 9:50 ` 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=20260519074247.C5643C2BCC6@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+contact.alex-min.fr@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