Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: mtd: Ensure partition node properties are documented

Partition nodes without a compatible have no restrictions on additional
properties. Fix this by ensuring 'unevaluatedProperties' is set when
there's no compatible property. If there is a compatible property, then
there should be a specific schema for it which will enforce
'unevaluatedProperties'.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Rob Herring (Arm) and committed by
Miquel Raynal
1eb9fabd 95af1e64

+18 -10
+2 -6
Documentation/devicetree/bindings/mtd/mtd.yaml
··· 36 36 - compatible 37 37 38 38 patternProperties: 39 - "@[0-9a-f]+$": 40 - $ref: partitions/partition.yaml 41 - deprecated: true 42 - 43 - "^partition@[0-9a-f]+": 44 - $ref: partitions/partition.yaml 39 + "(^partition)?@[0-9a-f]+$": 40 + $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node 45 41 deprecated: true 46 42 47 43 "^otp(-[0-9]+)?$":
+1 -1
Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
··· 33 33 34 34 patternProperties: 35 35 "@[0-9a-f]+$": 36 - $ref: partition.yaml# 36 + $ref: partition.yaml#/$defs/partition-node 37 37 38 38 required: 39 39 - "#address-cells"
+12
Documentation/devicetree/bindings/mtd/partitions/partition.yaml
··· 149 149 # This is a generic file other binding inherit from and extend 150 150 additionalProperties: true 151 151 152 + $defs: 153 + partition-node: 154 + type: object 155 + if: 156 + not: 157 + required: [ compatible ] 158 + then: 159 + $ref: '#' 160 + unevaluatedProperties: false 161 + else: 162 + $ref: '#' 163 + 152 164 examples: 153 165 - | 154 166 partitions {
+1 -1
Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
··· 38 38 39 39 patternProperties: 40 40 "^partition-.*$": 41 - $ref: partition.yaml# 41 + $ref: partition.yaml#/$defs/partition-node 42 42 43 43 required: 44 44 - partitions-table-offset
+1 -1
Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
··· 29 29 30 30 patternProperties: 31 31 "^partition-.*$": 32 - $ref: partition.yaml# 32 + $ref: partition.yaml#/$defs/partition-node 33 33 34 34 unevaluatedProperties: false 35 35
+1 -1
Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml
··· 36 36 37 37 patternProperties: 38 38 "@[0-9a-f]+$": 39 - $ref: /schemas/mtd/partitions/partition.yaml 39 + $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node 40 40 41 41 allOf: 42 42 - $ref: /schemas/memory-controllers/ti,gpmc-child.yaml