dt-bindings: mtd: partitions: make partition an NVMEM provider
Subsystems (2)
PATCH 1/1 dt-bindings: mtd: partitions: make partition an NVMEM provider
From: Rafał Miłecki <[email protected]>
MTD partition provides flash device data and can be used as NVMEM device.
--- .../bindings/mtd/partitions/partition.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/mtd/partitions/partition.yaml +9 -7
@@ -57,13 +57,15 @@ properties: user space from type: boolean -if: - not: - required: [ reg ] -then: - properties: - $nodename: - pattern: '^partition-.*$' +allOf: + - $ref: /schemas/nvmem/nvmem.yaml + - if: + not: + required: [ reg ] + then: + properties: + $nodename: + pattern: '^partition-.*$' # This is a generic file other binding inherit from and extend additionalProperties: true
Signature · 1 line
2.35.3
Cc Srini & Greg (please keep them in loop in case or replies)
Quoted 37 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
MTD partition provides flash device data and can be used as NVMEM device.
Signed-off-by Rafał Miłecki <[email protected]>--- .../bindings/mtd/partitions/partition.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)Documentation/devicetree/bindings/mtd/partitions/partition.yaml +9
-7@@ -57,13 +57,15 @@ properties: user space from type: boolean -if: - not: - required: [ reg ] -then: - properties: - $nodename: - pattern: '^partition-.*$' +allOf: + - $ref: /schemas/nvmem/nvmem.yaml + - if: + not: + required: [ reg ] + then: + properties: + $nodename: + pattern: '^partition-.*$' # This is a generic file other binding inherit from and extend additionalProperties: true
Rob Herring
maintainerQuoted 4 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
MTD partition provides flash device data and can be used as NVMEM device.
I don't follow what is the relationship between this and your other series.
Quoted 13 lines
Signed-off-by Rafał Miłecki <[email protected]>--- .../bindings/mtd/partitions/partition.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)Documentation/devicetree/bindings/mtd/partitions/partition.yaml +0
-0@@ -57,13 +57,15 @@ properties: user space from type: boolean
Documentation/devicetree/bindings/mtd/partitions/partition.yaml properties: · line 61
Quoted 10 lines
Documentation/devicetree/bindings/mtd/partitions/partition.yaml +2
-7-if: - not: - required: [ reg ] -then: - properties: - $nodename: - pattern: '^partition-.*$' +allOf: + - $ref: /schemas/nvmem/nvmem.yaml
Only some partitions are nvmem nodes, so we shouldn't always include it. Then we can't exclude nvmem properties from partition nodes which aren't. We should identify those nodes by compatible and their schema should reference partition.yaml and nvmem.yaml.
There's a general problem with the partition related schemas that undefined properties are not caught. This is partly because partition nodes can be nested and expressing that with the schema is hard.
Rob