[PATCH] dt-bindings: mtd: physmap: Ensure all properties are defined

Rob Herring (Arm) posted 1 patch 1 year ago
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] dt-bindings: mtd: physmap: Ensure all properties are defined
Posted by Rob Herring (Arm) 1 year ago
Device specific schemas should not allow undefined properties which is
what 'additionalProperties: true' allows. Add the missing 'ranges'
property, and fix this constraint.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
index 18f6733408b4..1b375dee83b0 100644
--- a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
@@ -122,6 +122,8 @@ properties:
   '#size-cells':
     const: 1
 
+  ranges: true
+
   big-endian: true
   little-endian: true
 
@@ -143,8 +145,7 @@ then:
   required:
     - syscon
 
-# FIXME: A parent bus may define timing properties
-additionalProperties: true
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.47.2
Re: [PATCH] dt-bindings: mtd: physmap: Ensure all properties are defined
Posted by Miquel Raynal 1 year ago
On Mon, 03 Feb 2025 15:30:35 -0600, Rob Herring (Arm) wrote:
> Device specific schemas should not allow undefined properties which is
> what 'additionalProperties: true' allows. Add the missing 'ranges'
> property, and fix this constraint.
> 
> 

Applied to mtd/next, thanks!

[1/1] dt-bindings: mtd: physmap: Ensure all properties are defined
      commit: 038e2ba01cf5ff94dc8f740328ec565d18bb764e

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl

Re: [PATCH] dt-bindings: mtd: physmap: Ensure all properties are defined
Posted by Conor Dooley 1 year ago
On Mon, Feb 03, 2025 at 03:30:35PM -0600, Rob Herring (Arm) wrote:
> Device specific schemas should not allow undefined properties which is
> what 'additionalProperties: true' allows. Add the missing 'ranges'
> property, and fix this constraint.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
> index 18f6733408b4..1b375dee83b0 100644
> --- a/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
> @@ -122,6 +122,8 @@ properties:
>    '#size-cells':
>      const: 1
>  
> +  ranges: true
> +
>    big-endian: true
>    little-endian: true
>  
> @@ -143,8 +145,7 @@ then:
>    required:
>      - syscon
>  
> -# FIXME: A parent bus may define timing properties
> -additionalProperties: true
> +unevaluatedProperties: false

I dunno what that comment has to do with anything? If a parent bus
defined properties, wouldn't they be in the parent bus?

Acked-by: Conor Dooley <conor.dooley@microchip.com>