diff mbox series

[3/5] dt-bindings: gpu: samsung: constrain clocks in top-level properties

Message ID 20231112184403.3449-3-krzysztof.kozlowski@linaro.org (mailing list archive)
State New, archived
Headers show
Series [1/5] dt-bindings: gpu: samsung-rotator: drop redundant quotes | expand

Commit Message

Krzysztof Kozlowski Nov. 12, 2023, 6:44 p.m. UTC
When number of clock varies between variants, the Devicetree bindings
coding convention expects to have widest constraints in top-level
definition of the properties and narrow them in allOf:if:then block.

This is more readable and sometimes allows to spot some errors in the
bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/gpu/samsung-g2d.yaml | 10 ++++++++--
 .../devicetree/bindings/gpu/samsung-scaler.yaml        | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

Comments

Conor Dooley Nov. 13, 2023, 1:51 p.m. UTC | #1
On Sun, Nov 12, 2023 at 07:44:01PM +0100, Krzysztof Kozlowski wrote:
> When number of clock varies between variants, the Devicetree bindings
> coding convention expects to have widest constraints in top-level
> definition of the properties and narrow them in allOf:if:then block.
> 
> This is more readable and sometimes allows to spot some errors in the
> bindings.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Åcked-by: Conor Dooley <conor.dooley@microchip.com>
Rob Herring Nov. 16, 2023, 4:28 p.m. UTC | #2
On Mon, Nov 13, 2023 at 01:51:30PM +0000, Conor Dooley wrote:
> On Sun, Nov 12, 2023 at 07:44:01PM +0100, Krzysztof Kozlowski wrote:
> > When number of clock varies between variants, the Devicetree bindings
> > coding convention expects to have widest constraints in top-level
> > definition of the properties and narrow them in allOf:if:then block.
> > 
> > This is more readable and sometimes allows to spot some errors in the
> > bindings.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> 
> Åcked-by: Conor Dooley <conor.dooley@microchip.com>

  ^

Not an 'A'. I only caught this because I go thru everything 
Acked/Reviewed-by first and this one was missed.

Rob
Krzysztof Kozlowski Nov. 16, 2023, 5:17 p.m. UTC | #3
On 16/11/2023 17:28, Rob Herring wrote:
> On Mon, Nov 13, 2023 at 01:51:30PM +0000, Conor Dooley wrote:
>> On Sun, Nov 12, 2023 at 07:44:01PM +0100, Krzysztof Kozlowski wrote:
>>> When number of clock varies between variants, the Devicetree bindings
>>> coding convention expects to have widest constraints in top-level
>>> definition of the properties and narrow them in allOf:if:then block.
>>>
>>> This is more readable and sometimes allows to spot some errors in the
>>> bindings.
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>>
>> Åcked-by: Conor Dooley <conor.dooley@microchip.com>
> 
>   ^
> 
> Not an 'A'. I only caught this because I go thru everything 
> Acked/Reviewed-by first and this one was missed.

And in Norwegian it is pronounced as "o", so this would be ocked-by :)

Best regards,
Krzysztof
Conor Dooley Nov. 16, 2023, 5:24 p.m. UTC | #4
On Thu, Nov 16, 2023 at 06:17:31PM +0100, Krzysztof Kozlowski wrote:
> On 16/11/2023 17:28, Rob Herring wrote:
> > On Mon, Nov 13, 2023 at 01:51:30PM +0000, Conor Dooley wrote:
> >> On Sun, Nov 12, 2023 at 07:44:01PM +0100, Krzysztof Kozlowski wrote:
> >>> When number of clock varies between variants, the Devicetree bindings
> >>> coding convention expects to have widest constraints in top-level
> >>> definition of the properties and narrow them in allOf:if:then block.
> >>>
> >>> This is more readable and sometimes allows to spot some errors in the
> >>> bindings.
> >>>
> >>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >>
> >> Åcked-by: Conor Dooley <conor.dooley@microchip.com>
> > 
> >   ^
> > 
> > Not an 'A'. I only caught this because I go thru everything 
> > Acked/Reviewed-by first and this one was missed.
> 
> And in Norwegian it is pronounced as "o", so this would be ocked-by :)

What on earth! The fedora install on this macbook I've been travelling
with does some odd things (clearly there's some setting I need to
disable) if I type something incorrectly and hit a backspace, but I use
a vim keybind to "type" my acks etc, so I am not sure that could have
been affected. FWIW,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml b/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
index b6951acc7643..f368966cf83a 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
+++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
@@ -22,8 +22,14 @@  properties:
   interrupts:
     maxItems: 1
 
-  clocks: {}
-  clock-names: {}
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+
   iommus: {}
   power-domains: {}
 
diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
index 97d86a002a90..e08fc1e4115f 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
+++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
@@ -21,8 +21,14 @@  properties:
   interrupts:
     maxItems: 1
 
-  clocks: {}
-  clock-names: {}
+  clocks:
+    minItems: 1
+    maxItems: 3
+
+  clock-names:
+    minItems: 1
+    maxItems: 3
+
   iommus: {}
   power-domains: {}