mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v2 1/2] media: dt-bindings: renesas,fcp: add top-level constraints
Date: Tue, 28 Jan 2025 10:10:49 -0600	[thread overview]
Message-ID: <20250128161049.GA3543944-robh@kernel.org> (raw)
In-Reply-To: <20250128095355.65766-1-krzysztof.kozlowski@linaro.org>

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@microchip.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.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:


  parent reply	other threads:[~2025-01-28 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28  9:53 Krzysztof Kozlowski
2025-01-28  9:53 ` [PATCH v2 2/2] media: dt-bindings: renesas,vsp1: " Krzysztof Kozlowski
2025-01-28 16:10 ` Rob Herring [this message]
2025-01-28 16:32   ` [PATCH v2 1/2] media: dt-bindings: renesas,fcp: " Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250128161049.GA3543944-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®