[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250128161049.GA3543944-robh@kernel.org>
Date: Tue, 28 Jan 2025 10:10:49 -0600
From: Rob Herring <robh@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>, linux-media@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Conor Dooley <conor.dooley@...rochip.com>
Subject: Re: [PATCH v2 1/2] media: dt-bindings: renesas,fcp: add top-level
constraints
On Tue, Jan 28, 2025 at 10:53:54AM +0100, Krzysztof Kozlowski wrote:
> Properties with variable number of items per each device are expected to
> have widest constraints in top-level "properties:" block and further
> customized (narrowed) in "if:then:". Add missing top-level constraints
> for clocks and clock-names.
>
> Acked-by: Conor Dooley <conor.dooley@...rochip.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
How did you find these? The below dtschema patch will find them.
Unfortunately, there's a lot of false positives. We could eliminate some
of them, but not sure we could get to 0. The main problem is if the
constraints are somewhere else (e.g. reset-gpios) or via a $ref.
8<-------------------------------------------------------
diff --git a/dtschema/meta-schemas/cell.yaml b/dtschema/meta-schemas/cell.yaml
index 3f61ed93593b..b4f0d9ea0559 100644
--- a/dtschema/meta-schemas/cell.yaml
+++ b/dtschema/meta-schemas/cell.yaml
@@ -7,6 +7,7 @@ $id: http://devicetree.org/meta-schemas/cell.yaml#
$schema: https://json-schema.org/draft/2019-09/schema
array:
+ type: object
description: cell array properties must define how many entries and what the
entries are when there is more than one entry.
anyOf:
diff --git a/dtschema/meta-schemas/core.yaml b/dtschema/meta-schemas/core.yaml
index c8cd03439239..233a2afd696b 100644
--- a/dtschema/meta-schemas/core.yaml
+++ b/dtschema/meta-schemas/core.yaml
@@ -16,7 +16,9 @@ allOf:
definitions:
unit-suffix-properties:
- $ref: cell.yaml#/array
+ oneOf:
+ - $ref: cell.yaml#/array
+ - type: boolean
propertyNames:
description: Standard unit suffix properties don't need a type $ref
not:
@@ -44,7 +46,9 @@ definitions:
core-properties:
properties:
ranges:
- $ref: cell.yaml#/array
+ oneOf:
+ - $ref: cell.yaml#/array
+ - type: boolean
reg:
$ref: cell.yaml#/array
compatible:
diff --git a/dtschema/meta-schemas/string-array.yaml b/dtschema/meta-schemas/string-array.yaml
index f5234c6c2fc6..4d4824bc108b 100644
--- a/dtschema/meta-schemas/string-array.yaml
+++ b/dtschema/meta-schemas/string-array.yaml
@@ -5,7 +5,8 @@
---
$id: http://devicetree.org/meta-schemas/string-array.yaml#
$schema: https://json-schema.org/draft/2019-09/schema
-#type: object
+
+type: object
if:
not:
Powered by blists - more mailing lists