Commit 9e10a1de authored by Rob Herring's avatar Rob Herring Committed by Mark Brown

ASoC: dt-bindings: Add missing (unevaluated|additional)Properties on child nodes

In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220823145649.3118479-8-robh@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a337c201
...@@ -40,6 +40,7 @@ properties: ...@@ -40,6 +40,7 @@ properties:
patternProperties: patternProperties:
"^dai-link-[0-9]+$": "^dai-link-[0-9]+$":
type: object type: object
additionalProperties: false
description: |- description: |-
dai-link child nodes: dai-link child nodes:
Container for dai-link level properties and the CODEC sub-nodes. Container for dai-link level properties and the CODEC sub-nodes.
...@@ -63,6 +64,7 @@ patternProperties: ...@@ -63,6 +64,7 @@ patternProperties:
patternProperties: patternProperties:
"^codec-[0-9]+$": "^codec-[0-9]+$":
type: object type: object
additionalProperties: false
description: |- description: |-
Codecs: Codecs:
dai-link representing backend links should have at least one subnode. dai-link representing backend links should have at least one subnode.
......
...@@ -28,6 +28,8 @@ properties: ...@@ -28,6 +28,8 @@ properties:
patternProperties: patternProperties:
"^endpoint(@[0-9a-f]+)?": "^endpoint(@[0-9a-f]+)?":
$ref: /schemas/graph.yaml#/$defs/endpoint-base $ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties: properties:
mclk-fs: mclk-fs:
description: | description: |
......
...@@ -61,6 +61,8 @@ patternProperties: ...@@ -61,6 +61,8 @@ patternProperties:
cpu: cpu:
description: Holds subnode which indicates cpu dai. description: Holds subnode which indicates cpu dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
...@@ -68,6 +70,8 @@ patternProperties: ...@@ -68,6 +70,8 @@ patternProperties:
codec: codec:
description: Holds subnode which indicates codec dai. description: Holds subnode which indicates codec dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
......
...@@ -58,6 +58,7 @@ patternProperties: ...@@ -58,6 +58,7 @@ patternProperties:
cpu: cpu:
description: Holds subnode which indicates cpu dai. description: Holds subnode which indicates cpu dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
...@@ -65,6 +66,7 @@ patternProperties: ...@@ -65,6 +66,7 @@ patternProperties:
codec: codec:
description: Holds subnode which indicates codec dai. description: Holds subnode which indicates codec dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
minItems: 1 minItems: 1
......
...@@ -30,6 +30,8 @@ properties: ...@@ -30,6 +30,8 @@ properties:
headset-codec: headset-codec:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
...@@ -38,6 +40,8 @@ properties: ...@@ -38,6 +40,8 @@ properties:
speaker-codecs: speaker-codecs:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
minItems: 1 minItems: 1
......
...@@ -71,6 +71,8 @@ patternProperties: ...@@ -71,6 +71,8 @@ patternProperties:
cpu: cpu:
description: Holds subnode which indicates cpu dai. description: Holds subnode which indicates cpu dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
...@@ -78,6 +80,8 @@ patternProperties: ...@@ -78,6 +80,8 @@ patternProperties:
platform: platform:
description: Holds subnode which indicates platform dai. description: Holds subnode which indicates platform dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
...@@ -85,6 +89,8 @@ patternProperties: ...@@ -85,6 +89,8 @@ patternProperties:
codec: codec:
description: Holds subnode which indicates codec dai. description: Holds subnode which indicates codec dai.
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
minItems: 1 minItems: 1
......
...@@ -129,6 +129,8 @@ properties: ...@@ -129,6 +129,8 @@ properties:
patternProperties: patternProperties:
"^dvc-[0-1]$": "^dvc-[0-1]$":
type: object type: object
additionalProperties: false
properties: properties:
dmas: dmas:
maxItems: 1 maxItems: 1
...@@ -145,7 +147,7 @@ properties: ...@@ -145,7 +147,7 @@ properties:
patternProperties: patternProperties:
"^mix-[0-1]$": "^mix-[0-1]$":
type: object type: object
# no properties additionalProperties: false
additionalProperties: false additionalProperties: false
rcar_sound,ctu: rcar_sound,ctu:
...@@ -154,7 +156,7 @@ properties: ...@@ -154,7 +156,7 @@ properties:
patternProperties: patternProperties:
"^ctu-[0-7]$": "^ctu-[0-7]$":
type: object type: object
# no properties additionalProperties: false
additionalProperties: false additionalProperties: false
rcar_sound,src: rcar_sound,src:
...@@ -163,6 +165,8 @@ properties: ...@@ -163,6 +165,8 @@ properties:
patternProperties: patternProperties:
"^src-[0-9]$": "^src-[0-9]$":
type: object type: object
additionalProperties: false
properties: properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
...@@ -186,6 +190,8 @@ properties: ...@@ -186,6 +190,8 @@ properties:
patternProperties: patternProperties:
"^ssiu-[0-9]+$": "^ssiu-[0-9]+$":
type: object type: object
additionalProperties: false
properties: properties:
dmas: dmas:
maxItems: 2 maxItems: 2
...@@ -206,6 +212,8 @@ properties: ...@@ -206,6 +212,8 @@ properties:
patternProperties: patternProperties:
"^ssi-[0-9]$": "^ssi-[0-9]$":
type: object type: object
additionalProperties: false
properties: properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
...@@ -243,6 +251,8 @@ properties: ...@@ -243,6 +251,8 @@ properties:
patternProperties: patternProperties:
"^dai([0-9]+)?$": "^dai([0-9]+)?$":
type: object type: object
additionalProperties: false
properties: properties:
playback: playback:
$ref: /schemas/types.yaml#/definitions/phandle-array $ref: /schemas/types.yaml#/definitions/phandle-array
......
...@@ -23,6 +23,7 @@ properties: ...@@ -23,6 +23,7 @@ properties:
cpu: cpu:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
minItems: 2 minItems: 2
...@@ -34,6 +35,7 @@ properties: ...@@ -34,6 +35,7 @@ properties:
- sound-dai - sound-dai
codec: codec:
additionalProperties: false
type: object type: object
properties: properties:
sound-dai: sound-dai:
......
...@@ -19,6 +19,7 @@ properties: ...@@ -19,6 +19,7 @@ properties:
cpu: cpu:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
...@@ -28,6 +29,7 @@ properties: ...@@ -28,6 +29,7 @@ properties:
codec: codec:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
maxItems: 1 maxItems: 1
......
...@@ -19,6 +19,7 @@ properties: ...@@ -19,6 +19,7 @@ properties:
codec: codec:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
description: List of phandles to the CODEC and HDMI IP nodes. description: List of phandles to the CODEC and HDMI IP nodes.
...@@ -30,6 +31,7 @@ properties: ...@@ -30,6 +31,7 @@ properties:
cpu: cpu:
type: object type: object
additionalProperties: false
properties: properties:
sound-dai: sound-dai:
description: Phandle to the Samsung I2S controller. description: Phandle to the Samsung I2S controller.
......
...@@ -60,6 +60,7 @@ required: ...@@ -60,6 +60,7 @@ required:
patternProperties: patternProperties:
"^audio-controller@[0-9a-f]+$": "^audio-controller@[0-9a-f]+$":
type: object type: object
additionalProperties: false
description: description:
Two subnodes corresponding to SAI sub-block instances A et B Two subnodes corresponding to SAI sub-block instances A et B
can be defined. Subnode can be omitted for unsused sub-block. can be defined. Subnode can be omitted for unsused sub-block.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment