Skip to contentSkip to conversation

dt-bindings: Fix missing '/schemas' in $ref paths

PATCH In review Rob Herring 4 participants 4 messages Mar 25, 2022 – May 2, 2022

Subsystems (12)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: Fix missing '/schemas' in $ref paths

Absolute paths in $ref should always begin with '/schemas'. The tools mostly work with it omitted, but for correctness the path should be everything except the hostname as that is taken from the schema's $id value. This scheme is defined in the json-schema spec.

Cc Hector Martin <[email protected]>
Cc Sven Peter <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Vivien Didelot <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Vladimir Oltean <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Paolo Abeni <[email protected]>
Cc Mark Brown <[email protected]>
Cc Chunfeng Yun <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Mukesh Savaliya <[email protected]>
Cc Akash Asthana <[email protected]>
Cc Bayi Cheng <[email protected]>
Cc Chuanhong Guo <[email protected]>
Cc Min Guo <[email protected]>
---
 Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml   | 2 +-
 Documentation/devicetree/bindings/net/dsa/dsa-port.yaml       | 2 +-
 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml  | 2 +-
 .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml         | 2 +-
 Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml | 2 +-
 Documentation/devicetree/bindings/spi/sprd,spi-adi.yaml       | 2 +-
 Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml      | 4 ++--
 Documentation/devicetree/bindings/usb/mediatek,musb.yaml      | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml +1 -1
index b6b5d3a912b3..0dc957a56d35 100644
@@ -42,7 +42,7 @@ patternProperties:
     description:
       The individual power management domains within this controller
     type: object
-    $ref: /power/apple,pmgr-pwrstate.yaml#
+    $ref: /schemas/power/apple,pmgr-pwrstate.yaml#
 
 required:
   - compatible
Documentation/devicetree/bindings/net/dsa/dsa-port.yaml +1 -1
index e60867c7c571..07a85f7b17e0 100644
@@ -15,7 +15,7 @@ description:
   Ethernet switch port Description
 
 allOf:
-  - $ref: "http://devicetree.org/schemas/net/ethernet-controller.yaml#"
+  - $ref: /schemas/net/ethernet-controller.yaml#
 
 properties:
   reg:
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml +1 -1
index a776cd37c297..95fcb43675d6 100644
@@ -103,7 +103,7 @@ patternProperties:
                  supports up to 50MHz, up to four chip selects, programmable
                  data path from 4 bits to 32 bits and numerous protocol
                  variants.
-    $ref: /spi/spi-controller.yaml#
+    $ref: /schemas/spi/spi-controller.yaml#
 
     properties:
       compatible:
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +1 -1
index be3cc7faed53..41e60fe4b09f 100644
@@ -18,7 +18,7 @@ description: |
   capability of this controller.
 
 allOf:
-  - $ref: /spi/spi-controller.yaml#
+  - $ref: /schemas/spi/spi-controller.yaml#
 
 properties:
   compatible:
Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml +1 -1
index 055524fe8327..5a60fba14bba 100644
@@ -16,7 +16,7 @@ description: The QSPI controller allows SPI protocol communication in single,
   as NOR flash.
 
 allOf:
-  - $ref: /spi/spi-controller.yaml#
+  - $ref: /schemas/spi/spi-controller.yaml#
 
 properties:
   compatible:
Documentation/devicetree/bindings/spi/sprd,spi-adi.yaml +1 -1
index fe014020da69..a3ab1a1f1eb4 100644
@@ -44,7 +44,7 @@ description: |
   compatibility.
 
 allOf:
-  - $ref: /spi/spi-controller.yaml#
+  - $ref: /schemas/spi/spi-controller.yaml#
 
 properties:
   compatible:
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +2 -2
index 77db1233516e..df766f8de872 100644
@@ -132,7 +132,7 @@ properties:
     default: host
 
   connector:
-    $ref: /connector/usb-connector.yaml#
+    $ref: /schemas/connector/usb-connector.yaml#
     description:
       Connector for dual role switch, especially for "gpio-usb-b-connector"
     type: object
@@ -191,7 +191,7 @@ properties:
 patternProperties:
   "^usb@[0-9a-f]+$":
     type: object
-    $ref: /usb/mediatek,mtk-xhci.yaml#
+    $ref: /schemas/usb/mediatek,mtk-xhci.yaml#
     description:
       The xhci should be added as subnode to mtu3 as shown in the following
       example if the host mode is enabled.
Documentation/devicetree/bindings/usb/mediatek,musb.yaml +1 -1
index 03d62d60ce5f..11a33f9b1f17 100644
@@ -63,7 +63,7 @@ properties:
     maxItems: 1
 
   connector:
-    $ref: /connector/usb-connector.yaml#
+    $ref: /schemas/connector/usb-connector.yaml#
     description: Connector for dual role switch
     type: object
 
Signature · 1 line
2.32.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Rob Herring

Absolute paths in $ref should always begin with '/schemas'. The tools mostly work with it omitted, but for correctness the path should be everything except the hostname as that is taken from the schema's $id value. This scheme is defined in the json-schema spec.

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 5 lines · On Fri, 25 Mar 2022 16:56:52 -0500 Rob Herring wrote:

Absolute paths in $ref should always begin with '/schemas'. The tools mostly work with it omitted, but for correctness the path should be everything except the hostname as that is taken from the schema's $id value. This scheme is defined in the json-schema spec.

Quoted 8 lines
Cc Hector Martin <[email protected]>
Cc Sven Peter <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Vivien Didelot <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Vladimir Oltean <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
Acked-by on v1 1/1
#3 lore raw
In reply to Rob Herring
Quoted 4 lines · Rob Herring

Absolute paths in $ref should always begin with '/schemas'. The tools mostly work with it omitted, but for correctness the path should be everything except the hostname as that is taken from the schema's $id value. This scheme is defined in the json-schema spec.

Signature · 2 lines
Hector Martin ([email protected])
Public Key: https://mrcn.st/pub