Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions
@ 2022-07-01 10:04 Bryan O'Donoghue
  2022-07-01 20:56 ` Rob Herring
  2022-07-02  9:29 ` Marijn Suijten
  0 siblings, 2 replies; 3+ messages in thread
From: Bryan O'Donoghue @ 2022-07-01 10:04 UTC (permalink / raw)
  To: agross, bjorn.andersson, myungjoo.ham, cw00.choi, robh+dt,
	krzysztof.kozlowski+dt, stephan, marijn.suijten
  Cc: linux-arm-msm, devicetree, bryan.odonoghue

dts validation is throwing an error for me on 8916 and 8939 with
extcon@1300. In that case we have usb_vbus but not usb_id.

It wasn't immediately obvious if there was a valid use-case for the
existing code for usb_id in isolation, however discussing further, we
concluded that usb_id, usb_vbus or (usb_id | usb_vbus) are valid
combinations as an external IC may be responsible for usb_id or usb_vbus.

Expand the definition with anyOf to capture the three different valid
modes.

Fixes: 4fcdd677c4ea ("bindings: pm8941-misc: Add support for VBUS detection")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
index 6a9c96f0352ac..1bc412a4ac5e6 100644
--- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
+++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
@@ -27,10 +27,14 @@ properties:
 
   interrupt-names:
     minItems: 1
-    items:
-      - const: usb_id
-      - const: usb_vbus
-
+    anyOf:
+      - items:
+          - const: usb_id
+          - const: usb_vbus
+      - items:
+          - const: usb_id
+      - items:
+          - const: usb_vbus
 required:
   - compatible
   - reg
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-02  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-01 10:04 [PATCH v2] dt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions Bryan O'Donoghue
2022-07-01 20:56 ` Rob Herring
2022-07-02  9:29 ` Marijn Suijten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox