All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array of voltages
@ 2022-03-31 21:16 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-31 21:16 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Alim Akhtar, linux-kernel, devicetree, linux-arm-kernel,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Geert Uytterhoeven

uint32-array with voltages should be within one bracket pair <>, not
each number in its own <>.  Also the number of elements in the array
should be defined within "items:".

This fixes DT schema warnings like:

  maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
    [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short

Fixes: 1d2104f21618 ("regulator: dt-bindings: maxim,max8997: convert to dtschema")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Patch is independent of DTS.
---
 .../bindings/regulator/maxim,max8997.yaml     | 55 +++++++++++--------
 1 file changed, 31 insertions(+), 24 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml b/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
index d5a44ca3df04..6305a9abaead 100644
--- a/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
+++ b/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
@@ -32,8 +32,9 @@ properties:
 
   max8997,pmic-buck1-dvs-voltage:
     $ref: /schemas/types.yaml#/definitions/uint32-array
-    minItems: 1
-    maxItems: 8
+    items:
+      minItems: 1
+      maxItems: 8
     description: |
       A set of 8 voltage values in micro-volt (uV) units for buck1 when
       changing voltage using GPIO DVS.
@@ -44,8 +45,9 @@ properties:
 
   max8997,pmic-buck2-dvs-voltage:
     $ref: /schemas/types.yaml#/definitions/uint32-array
-    minItems: 1
-    maxItems: 8
+    items:
+      minItems: 1
+      maxItems: 8
     description: |
       A set of 8 voltage values in micro-volt (uV) units for buck2 when
       changing voltage using GPIO DVS.
@@ -56,8 +58,9 @@ properties:
 
   max8997,pmic-buck5-dvs-voltage:
     $ref: /schemas/types.yaml#/definitions/uint32-array
-    minItems: 1
-    maxItems: 8
+    items:
+      minItems: 1
+      maxItems: 8
     description: |
       A set of 8 voltage values in micro-volt (uV) units for buck5 when
       changing voltage using GPIO DVS.
@@ -267,14 +270,17 @@ if:
 then:
   properties:
     max8997,pmic-buck1-dvs-voltage:
-      minItems: 8
-      maxItems: 8
+      items:
+        minItems: 8
+        maxItems: 8
     max8997,pmic-buck2-dvs-voltage:
-      minItems: 8
-      maxItems: 8
+      items:
+        minItems: 8
+        maxItems: 8
     max8997,pmic-buck5-dvs-voltage:
-      minItems: 8
-      maxItems: 8
+      items:
+        minItems: 8
+        maxItems: 8
 
 examples:
   - |
@@ -303,20 +309,21 @@ examples:
                                              <&gpx0 6 GPIO_ACTIVE_HIGH>,
                                              <&gpl0 0 GPIO_ACTIVE_HIGH>;
 
-            max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
-                                             <1250000>, <1200000>,
-                                             <1150000>, <1100000>,
-                                             <1000000>, <950000>;
+            max8997,pmic-buck1-dvs-voltage = <1350000 1300000
+                                              1250000 1200000
+                                              1150000 1100000
+                                              1000000  950000>;
+
+            max8997,pmic-buck2-dvs-voltage = <1100000 1000000
+                                               950000  900000
+                                              1100000 1000000
+                                               950000  900000>;
 
-            max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
-                                             <950000>,  <900000>,
-                                             <1100000>, <1000000>,
-                                             <950000>,  <900000>;
 
-            max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
-                                             <1200000>, <1200000>,
-                                             <1200000>, <1200000>,
-                                             <1200000>, <1200000>;
+            max8997,pmic-buck5-dvs-voltage = <1200000 1200000
+                                              1200000 1200000
+                                              1200000 1200000
+                                              1200000 1200000>;
 
             pinctrl-0 = <&max8997_irq>, <&otg_gp>, <&usb_sel>;
             pinctrl-names = "default";
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages
@ 2022-03-31 21:16 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-31 21:16 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Alim Akhtar, linux-kernel, devicetree, linux-arm-kernel,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Geert Uytterhoeven

uint32-array with voltages should be within one bracket pair <>, not
each number in its own <>.  Also the number of elements in the array
should be defined within "items:".

This fixes DT schema warnings like:

  maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
    [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short

Fixes: 1d2104f21618 ("regulator: dt-bindings: maxim,max8997: convert to dtschema")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Patch is independent of DTS.
---
 .../bindings/regulator/maxim,max8997.yaml     | 55 +++++++++++--------
 1 file changed, 31 insertions(+), 24 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml b/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
index d5a44ca3df04..6305a9abaead 100644
--- a/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
+++ b/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
@@ -32,8 +32,9 @@ properties:
 
   max8997,pmic-buck1-dvs-voltage:
     $ref: /schemas/types.yaml#/definitions/uint32-array
-    minItems: 1
-    maxItems: 8
+    items:
+      minItems: 1
+      maxItems: 8
     description: |
       A set of 8 voltage values in micro-volt (uV) units for buck1 when
       changing voltage using GPIO DVS.
@@ -44,8 +45,9 @@ properties:
 
   max8997,pmic-buck2-dvs-voltage:
     $ref: /schemas/types.yaml#/definitions/uint32-array
-    minItems: 1
-    maxItems: 8
+    items:
+      minItems: 1
+      maxItems: 8
     description: |
       A set of 8 voltage values in micro-volt (uV) units for buck2 when
       changing voltage using GPIO DVS.
@@ -56,8 +58,9 @@ properties:
 
   max8997,pmic-buck5-dvs-voltage:
     $ref: /schemas/types.yaml#/definitions/uint32-array
-    minItems: 1
-    maxItems: 8
+    items:
+      minItems: 1
+      maxItems: 8
     description: |
       A set of 8 voltage values in micro-volt (uV) units for buck5 when
       changing voltage using GPIO DVS.
@@ -267,14 +270,17 @@ if:
 then:
   properties:
     max8997,pmic-buck1-dvs-voltage:
-      minItems: 8
-      maxItems: 8
+      items:
+        minItems: 8
+        maxItems: 8
     max8997,pmic-buck2-dvs-voltage:
-      minItems: 8
-      maxItems: 8
+      items:
+        minItems: 8
+        maxItems: 8
     max8997,pmic-buck5-dvs-voltage:
-      minItems: 8
-      maxItems: 8
+      items:
+        minItems: 8
+        maxItems: 8
 
 examples:
   - |
@@ -303,20 +309,21 @@ examples:
                                              <&gpx0 6 GPIO_ACTIVE_HIGH>,
                                              <&gpl0 0 GPIO_ACTIVE_HIGH>;
 
-            max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
-                                             <1250000>, <1200000>,
-                                             <1150000>, <1100000>,
-                                             <1000000>, <950000>;
+            max8997,pmic-buck1-dvs-voltage = <1350000 1300000
+                                              1250000 1200000
+                                              1150000 1100000
+                                              1000000  950000>;
+
+            max8997,pmic-buck2-dvs-voltage = <1100000 1000000
+                                               950000  900000
+                                              1100000 1000000
+                                               950000  900000>;
 
-            max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
-                                             <950000>,  <900000>,
-                                             <1100000>, <1000000>,
-                                             <950000>,  <900000>;
 
-            max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
-                                             <1200000>, <1200000>,
-                                             <1200000>, <1200000>,
-                                             <1200000>, <1200000>;
+            max8997,pmic-buck5-dvs-voltage = <1200000 1200000
+                                              1200000 1200000
+                                              1200000 1200000
+                                              1200000 1200000>;
 
             pinctrl-0 = <&max8997_irq>, <&otg_gp>, <&usb_sel>;
             pinctrl-names = "default";
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ARM: dts: exynos: correct array of voltages in i9100 and Trats
  2022-03-31 21:16 ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Krzysztof Kozlowski
@ 2022-03-31 21:16   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-31 21:16 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Alim Akhtar, linux-kernel, devicetree, linux-arm-kernel,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Geert Uytterhoeven

Array of uint32 numbers (voltages) should be within one bracket pair <>,
according to Devicetree types and DT schema.

This fixes DT schema warnings like:

  exynos4210-trats.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage: [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
    From schema: Documentation/devicetree/bindings/regulator/maxim,max8997.yaml

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/exynos4210-i9100.dts | 28 +++++++++++++-------------
 arch/arm/boot/dts/exynos4210-trats.dts | 28 +++++++++++++-------------
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-i9100.dts b/arch/arm/boot/dts/exynos4210-i9100.dts
index 3c0a18b30837..4058e780e288 100644
--- a/arch/arm/boot/dts/exynos4210-i9100.dts
+++ b/arch/arm/boot/dts/exynos4210-i9100.dts
@@ -421,20 +421,20 @@ pmic@66 {
 						 <&gpx0 6 GPIO_ACTIVE_HIGH>,
 						 <&gpl0 0 GPIO_ACTIVE_HIGH>;
 
-		max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
-						 <1250000>, <1200000>,
-						 <1150000>, <1100000>,
-						 <1000000>, <950000>;
-
-		max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
-						 <950000>,  <900000>,
-						 <1100000>, <1000000>,
-						 <950000>,  <900000>;
-
-		max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>;
+		max8997,pmic-buck1-dvs-voltage = <1350000 1300000
+						  1250000 1200000
+						  1150000 1100000
+						  1000000  950000>;
+
+		max8997,pmic-buck2-dvs-voltage = <1100000 1000000
+						   950000  900000
+						  1100000 1000000
+						   950000  900000>;
+
+		max8997,pmic-buck5-dvs-voltage = <1200000 1200000
+						  1200000 1200000
+						  1200000 1200000
+						  1200000 1200000>;
 
 		pinctrl-0 = <&max8997_irq>, <&otg_gp>, <&usb_sel>;
 		pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 01f44d95f671..23041db78f2e 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -302,20 +302,20 @@ pmic@66 {
 						 <&gpx0 6 GPIO_ACTIVE_HIGH>,
 						 <&gpl0 0 GPIO_ACTIVE_HIGH>;
 
-		max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
-						 <1250000>, <1200000>,
-						 <1150000>, <1100000>,
-						 <1000000>, <950000>;
-
-		max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
-						 <950000>,  <900000>,
-						 <1100000>, <1000000>,
-						 <950000>,  <900000>;
-
-		max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>;
+		max8997,pmic-buck1-dvs-voltage = <1350000 1300000
+						  1250000 1200000
+						  1150000 1100000
+						  1000000  950000>;
+
+		max8997,pmic-buck2-dvs-voltage = <1100000 1000000
+						   950000  900000
+						  1100000 1000000
+						   950000  900000>;
+
+		max8997,pmic-buck5-dvs-voltage = <1200000 1200000
+						  1200000 1200000
+						  1200000 1200000
+						  1200000 1200000>;
 
 		regulators {
 			valive_reg: LDO2 {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ARM: dts: exynos: correct array of voltages in i9100 and Trats
@ 2022-03-31 21:16   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-31 21:16 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Alim Akhtar, linux-kernel, devicetree, linux-arm-kernel,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Geert Uytterhoeven

Array of uint32 numbers (voltages) should be within one bracket pair <>,
according to Devicetree types and DT schema.

This fixes DT schema warnings like:

  exynos4210-trats.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage: [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
    From schema: Documentation/devicetree/bindings/regulator/maxim,max8997.yaml

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/exynos4210-i9100.dts | 28 +++++++++++++-------------
 arch/arm/boot/dts/exynos4210-trats.dts | 28 +++++++++++++-------------
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-i9100.dts b/arch/arm/boot/dts/exynos4210-i9100.dts
index 3c0a18b30837..4058e780e288 100644
--- a/arch/arm/boot/dts/exynos4210-i9100.dts
+++ b/arch/arm/boot/dts/exynos4210-i9100.dts
@@ -421,20 +421,20 @@ pmic@66 {
 						 <&gpx0 6 GPIO_ACTIVE_HIGH>,
 						 <&gpl0 0 GPIO_ACTIVE_HIGH>;
 
-		max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
-						 <1250000>, <1200000>,
-						 <1150000>, <1100000>,
-						 <1000000>, <950000>;
-
-		max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
-						 <950000>,  <900000>,
-						 <1100000>, <1000000>,
-						 <950000>,  <900000>;
-
-		max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>;
+		max8997,pmic-buck1-dvs-voltage = <1350000 1300000
+						  1250000 1200000
+						  1150000 1100000
+						  1000000  950000>;
+
+		max8997,pmic-buck2-dvs-voltage = <1100000 1000000
+						   950000  900000
+						  1100000 1000000
+						   950000  900000>;
+
+		max8997,pmic-buck5-dvs-voltage = <1200000 1200000
+						  1200000 1200000
+						  1200000 1200000
+						  1200000 1200000>;
 
 		pinctrl-0 = <&max8997_irq>, <&otg_gp>, <&usb_sel>;
 		pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 01f44d95f671..23041db78f2e 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -302,20 +302,20 @@ pmic@66 {
 						 <&gpx0 6 GPIO_ACTIVE_HIGH>,
 						 <&gpl0 0 GPIO_ACTIVE_HIGH>;
 
-		max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
-						 <1250000>, <1200000>,
-						 <1150000>, <1100000>,
-						 <1000000>, <950000>;
-
-		max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
-						 <950000>,  <900000>,
-						 <1100000>, <1000000>,
-						 <950000>,  <900000>;
-
-		max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>;
+		max8997,pmic-buck1-dvs-voltage = <1350000 1300000
+						  1250000 1200000
+						  1150000 1100000
+						  1000000  950000>;
+
+		max8997,pmic-buck2-dvs-voltage = <1100000 1000000
+						   950000  900000
+						  1100000 1000000
+						   950000  900000>;
+
+		max8997,pmic-buck5-dvs-voltage = <1200000 1200000
+						  1200000 1200000
+						  1200000 1200000
+						  1200000 1200000>;
 
 		regulators {
 			valive_reg: LDO2 {
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array of voltages
  2022-03-31 21:16 ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Krzysztof Kozlowski
@ 2022-04-01  7:46   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2022-04-01  7:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Alim Akhtar, Linux Kernel Mailing List,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-samsung-soc

On Thu, Mar 31, 2022 at 11:17 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> uint32-array with voltages should be within one bracket pair <>, not
> each number in its own <>.  Also the number of elements in the array
> should be defined within "items:".
>
> This fixes DT schema warnings like:
>
>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
>
> Fixes: 1d2104f21618 ("regulator: dt-bindings: maxim,max8997: convert to dtschema")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks!
Warning going, and if I add one entry too much, it still complains, so:
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages
@ 2022-04-01  7:46   ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2022-04-01  7:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Alim Akhtar, Linux Kernel Mailing List,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-samsung-soc

On Thu, Mar 31, 2022 at 11:17 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> uint32-array with voltages should be within one bracket pair <>, not
> each number in its own <>.  Also the number of elements in the array
> should be defined within "items:".
>
> This fixes DT schema warnings like:
>
>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
>
> Fixes: 1d2104f21618 ("regulator: dt-bindings: maxim,max8997: convert to dtschema")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks!
Warning going, and if I add one entry too much, it still complains, so:
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array of voltages
  2022-03-31 21:16 ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Krzysztof Kozlowski
@ 2022-04-03 15:11   ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-04-03 15:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Alim Akhtar,
	linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc,
	Geert Uytterhoeven

On Thu, Mar 31, 2022 at 11:16:52PM +0200, Krzysztof Kozlowski wrote:
> uint32-array with voltages should be within one bracket pair <>, not
> each number in its own <>.  Also the number of elements in the array
> should be defined within "items:".

Which encoding an array uses has been a source of pain.

> 
> This fixes DT schema warnings like:
> 
>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short

These exist due to the move from validating yaml files to DTBs and I 
haven't come up with how to fix the warning. The schema was correct as 
it was. The change leaks the encoding (everything is a matrix) into the 
schema which we don't want to do.

The issue is in the if/then schema, the tools don't know if the type is 
an array or matrix. It gets it wrong (or different from the top-level) 
and thus the warning. I think the fix will be using the extracted type 
information to do the right transformation. The code for all this is 
pretty horrible and I've lost count of how many times I've re-written 
it. I think a lot of it can be removed when/if support for yaml encoded 
DT is removed which I think can happen in a kernel cycle or 2.

Perhaps in the short term the example can just be removed or commented 
out though that doesn't help on dts files.

Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages
@ 2022-04-03 15:11   ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-04-03 15:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Alim Akhtar,
	linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc,
	Geert Uytterhoeven

On Thu, Mar 31, 2022 at 11:16:52PM +0200, Krzysztof Kozlowski wrote:
> uint32-array with voltages should be within one bracket pair <>, not
> each number in its own <>.  Also the number of elements in the array
> should be defined within "items:".

Which encoding an array uses has been a source of pain.

> 
> This fixes DT schema warnings like:
> 
>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short

These exist due to the move from validating yaml files to DTBs and I 
haven't come up with how to fix the warning. The schema was correct as 
it was. The change leaks the encoding (everything is a matrix) into the 
schema which we don't want to do.

The issue is in the if/then schema, the tools don't know if the type is 
an array or matrix. It gets it wrong (or different from the top-level) 
and thus the warning. I think the fix will be using the extracted type 
information to do the right transformation. The code for all this is 
pretty horrible and I've lost count of how many times I've re-written 
it. I think a lot of it can be removed when/if support for yaml encoded 
DT is removed which I think can happen in a kernel cycle or 2.

Perhaps in the short term the example can just be removed or commented 
out though that doesn't help on dts files.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array of voltages
  2022-04-03 15:11   ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Rob Herring
@ 2022-04-03 15:46     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-03 15:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Alim Akhtar,
	linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc,
	Geert Uytterhoeven

On 03/04/2022 17:11, Rob Herring wrote:
> On Thu, Mar 31, 2022 at 11:16:52PM +0200, Krzysztof Kozlowski wrote:
>> uint32-array with voltages should be within one bracket pair <>, not
>> each number in its own <>.  Also the number of elements in the array
>> should be defined within "items:".
> 
> Which encoding an array uses has been a source of pain.
> 
>>
>> This fixes DT schema warnings like:
>>
>>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
> 
> These exist due to the move from validating yaml files to DTBs and I 
> haven't come up with how to fix the warning. The schema was correct as 
> it was. The change leaks the encoding (everything is a matrix) into the 
> schema which we don't want to do.
> 
> The issue is in the if/then schema, the tools don't know if the type is 
> an array or matrix. It gets it wrong (or different from the top-level) 
> and thus the warning. I think the fix will be using the extracted type 
> information to do the right transformation. The code for all this is 
> pretty horrible and I've lost count of how many times I've re-written 
> it. I think a lot of it can be removed when/if support for yaml encoded 
> DT is removed which I think can happen in a kernel cycle or 2.
> 
> Perhaps in the short term the example can just be removed or commented 
> out though that doesn't help on dts files.

I think I already might be adding the same pattern to other bindings I
convert, so maybe I should add at least comments to such cases so we can
fix it later.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] regulator: dt-bindings: maxim, max8997: correct array of voltages
@ 2022-04-03 15:46     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-03 15:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Alim Akhtar,
	linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc,
	Geert Uytterhoeven

On 03/04/2022 17:11, Rob Herring wrote:
> On Thu, Mar 31, 2022 at 11:16:52PM +0200, Krzysztof Kozlowski wrote:
>> uint32-array with voltages should be within one bracket pair <>, not
>> each number in its own <>.  Also the number of elements in the array
>> should be defined within "items:".
> 
> Which encoding an array uses has been a source of pain.
> 
>>
>> This fixes DT schema warnings like:
>>
>>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short
> 
> These exist due to the move from validating yaml files to DTBs and I 
> haven't come up with how to fix the warning. The schema was correct as 
> it was. The change leaks the encoding (everything is a matrix) into the 
> schema which we don't want to do.
> 
> The issue is in the if/then schema, the tools don't know if the type is 
> an array or matrix. It gets it wrong (or different from the top-level) 
> and thus the warning. I think the fix will be using the extracted type 
> information to do the right transformation. The code for all this is 
> pretty horrible and I've lost count of how many times I've re-written 
> it. I think a lot of it can be removed when/if support for yaml encoded 
> DT is removed which I think can happen in a kernel cycle or 2.
> 
> Perhaps in the short term the example can just be removed or commented 
> out though that doesn't help on dts files.

I think I already might be adding the same pattern to other bindings I
convert, so maybe I should add at least comments to such cases so we can
fix it later.


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-03 15:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 21:16 [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array of voltages Krzysztof Kozlowski
2022-03-31 21:16 ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Krzysztof Kozlowski
2022-03-31 21:16 ` [PATCH 2/2] ARM: dts: exynos: correct array of voltages in i9100 and Trats Krzysztof Kozlowski
2022-03-31 21:16   ` Krzysztof Kozlowski
2022-04-01  7:46 ` [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array of voltages Geert Uytterhoeven
2022-04-01  7:46   ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Geert Uytterhoeven
2022-04-03 15:11 ` [PATCH 1/2] regulator: dt-bindings: maxim,max8997: " Rob Herring
2022-04-03 15:11   ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Rob Herring
2022-04-03 15:46   ` [PATCH 1/2] regulator: dt-bindings: maxim,max8997: " Krzysztof Kozlowski
2022-04-03 15:46     ` [PATCH 1/2] regulator: dt-bindings: maxim, max8997: " Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.