mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-03-03 18:28:01 +01:00
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>
This commit is contained in:
committed by
Miquel Raynal
parent
95af1e641b
commit
1eb9fabd52
@@ -36,12 +36,8 @@ properties:
|
||||
- compatible
|
||||
|
||||
patternProperties:
|
||||
"@[0-9a-f]+$":
|
||||
$ref: partitions/partition.yaml
|
||||
deprecated: true
|
||||
|
||||
"^partition@[0-9a-f]+":
|
||||
$ref: partitions/partition.yaml
|
||||
"(^partition)?@[0-9a-f]+$":
|
||||
$ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
|
||||
deprecated: true
|
||||
|
||||
"^otp(-[0-9]+)?$":
|
||||
|
||||
@@ -33,7 +33,7 @@ properties:
|
||||
|
||||
patternProperties:
|
||||
"@[0-9a-f]+$":
|
||||
$ref: partition.yaml#
|
||||
$ref: partition.yaml#/$defs/partition-node
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
|
||||
@@ -149,6 +149,18 @@ then:
|
||||
# This is a generic file other binding inherit from and extend
|
||||
additionalProperties: true
|
||||
|
||||
$defs:
|
||||
partition-node:
|
||||
type: object
|
||||
if:
|
||||
not:
|
||||
required: [ compatible ]
|
||||
then:
|
||||
$ref: '#'
|
||||
unevaluatedProperties: false
|
||||
else:
|
||||
$ref: '#'
|
||||
|
||||
examples:
|
||||
- |
|
||||
partitions {
|
||||
|
||||
@@ -38,7 +38,7 @@ properties:
|
||||
|
||||
patternProperties:
|
||||
"^partition-.*$":
|
||||
$ref: partition.yaml#
|
||||
$ref: partition.yaml#/$defs/partition-node
|
||||
|
||||
required:
|
||||
- partitions-table-offset
|
||||
|
||||
@@ -29,7 +29,7 @@ properties:
|
||||
|
||||
patternProperties:
|
||||
"^partition-.*$":
|
||||
$ref: partition.yaml#
|
||||
$ref: partition.yaml#/$defs/partition-node
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ properties:
|
||||
|
||||
patternProperties:
|
||||
"@[0-9a-f]+$":
|
||||
$ref: /schemas/mtd/partitions/partition.yaml
|
||||
$ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/memory-controllers/ti,gpmc-child.yaml
|
||||
|
||||
Reference in New Issue
Block a user