Skip to content

Commit

Permalink
schemas: Allow '#' anywhere in DT property names
Browse files Browse the repository at this point in the history
Commit 0e28a44 ("meta-schemas: Allow '#' anywhere is DT property
names") amended the 'propertyNames' regex to allow names such as
'marvell,#interrupts'.

Make the same amendment to the allowed patternProperties for consistency
to avoid errors like:

  Documentation/devicetree/bindings/tpm/ibm,vtpm.example.dtb: vtpm@30000003: 'ibm,#dma-address-cells', 'ibm,#dma-size-cells' do not match any of the regexes: '.*-names$', '.*-supply$', '^#.*-cells$', '^#[a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z0-9][a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z0-9][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+(,[0-9a-fA-F]+)*$', '^__.*__$', 'pinctrl-[0-9]+'
  from schema $id: http://devicetree.org/schemas/dt-core.yaml#

Signed-off-by: Lukas Wunner <[email protected]>
  • Loading branch information
l1k authored and robherring committed Nov 21, 2023
1 parent 84f7cc9 commit 6780665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dtschema/schemas/dt-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ patternProperties:
- $ref: types.yaml#/definitions/phandle

# property and node namespace overlaps. Catch both here
"^[a-zA-Z0-9][a-zA-Z0-9,+\\-._]{0,63}$":
"^[a-zA-Z0-9][a-zA-Z0-9#,+\\-._]{0,63}$":
type: [object, array, boolean, 'null']

# Anything with a '@' is definitely a node
Expand Down

0 comments on commit 6780665

Please sign in to comment.