Skip to contentSkip to conversation

dt-bindings: vendor-prefixes: Also allow node names starting with '_'

PATCH In review Rob Herring 2 participants 3 messages Jun 13, 2019 Device tree bindings

lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/2 dt-bindings: vendor-prefixes: Also allow node names starting with '_'

Generated nodes for overlays begin with '_'. The binding examples are built as overlays in order to allow unresolved phandles, so we need to allow the generated node names.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/vendor-prefixes.yaml +1 -1
index e68c839e9f51..a777168432d0 100644
@@ -1028,7 +1028,7 @@ patternProperties:
 
   # Normal property name match without a comma
   # These should catch all node/property names without a prefix
-  "^[a-zA-Z0-9#][a-zA-Z0-9+\\-._@]{0,63}$": true
+  "^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$": true
   "^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$": true
   "^#.*": true
 
Signature · 1 line
2.20.1
author maintainer
#1 lore raw

PATCH 2/2 dt-bindings: Check the examples against the schemas

Currently, the binding examples are just built with dtc. dtc recently gained the support necessary to output the examples in YAML format (commit 87963ee20693 ("livetree: add missing type markers in generated overlay properties"). Now just switch the output format and the examples will be checked against the schema.

---
 Documentation/devicetree/bindings/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/Makefile +1 -1
index 8a2774b5834b..6b0dfd5c17ba 100644
@@ -25,7 +25,7 @@ DT_DOCS = $(shell \
 DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
 
 extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
-extra-y += $(patsubst $(src)/%.yaml,%.example.dtb, $(DT_SCHEMA_FILES))
+extra-y += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
 
 $(obj)/$(DT_TMP_SCHEMA): $(DT_SCHEMA_FILES) FORCE
 	$(call if_changed,mk_schema)
Signature · 1 line
2.20.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] dt-bindings: Check the examples against the schemas

Quoted 7 lines · Rob Herring

Currently, the binding examples are just built with dtc. dtc recently gained the support necessary to output the examples in YAML format (commit 87963ee20693 ("livetree: add missing type markers in generated overlay properties"). Now just switch the output format and the examples will be checked against the schema.

For both,

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com