linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums
@ 2025-07-06  9:58 Krzysztof Kozlowski
  2025-07-06 13:17 ` Chen-Yu Tsai
  2025-07-09 15:57 ` Chen-Yu Tsai
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-06  9:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel
  Cc: Krzysztof Kozlowski, lukas.schmid

The common style in all bindings for enumerating similar variants is to
use 'enum', not 'oneOf', so all boards of same variant or using same SoM
should be grouped under enum.  It is more readable, more compact and
makes easier to find actual devices from the same family/type.  Also
there is completely no point to repeat the compatible in the description
(incircuit,icnova-a20-adb4006 implies this is "ICnova A20 ADB4006" and
pine64,pinephone-1.2 implies "Pine64 PinePhone (1.2)").

Combine two easily visible cases: ICnova A20 and Pine64 PinePhone.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: lukas.schmid@netcube.li
---
 .../devicetree/bindings/arm/sunxi.yaml        | 31 ++++++-------------
 1 file changed, 9 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index 7807ea613258..f10c6ee6a0aa 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -341,15 +341,11 @@ properties:
           - const: allwinner,i12-tvbox
           - const: allwinner,sun7i-a20
 
-      - description: ICnova A20 ADB4006
+      - description: ICnova A20
         items:
-          - const: incircuit,icnova-a20-adb4006
-          - const: incircuit,icnova-a20
-          - const: allwinner,sun7i-a20
-
-      - description: ICNova A20 SWAC
-        items:
-          - const: incircuit,icnova-a20-swac
+          - enum:
+              - incircuit,icnova-a20-adb4006
+              - incircuit,icnova-a20-swac
           - const: incircuit,icnova-a20
           - const: allwinner,sun7i-a20
 
@@ -760,21 +756,12 @@ properties:
           - const: pine64,pinebook
           - const: allwinner,sun50i-a64
 
-      - description: Pine64 PinePhone Developer Batch (1.0)
+      - description: Pine64 PinePhone
         items:
-          - const: pine64,pinephone-1.0
-          - const: pine64,pinephone
-          - const: allwinner,sun50i-a64
-
-      - description: Pine64 PinePhone Braveheart (1.1)
-        items:
-          - const: pine64,pinephone-1.1
-          - const: pine64,pinephone
-          - const: allwinner,sun50i-a64
-
-      - description: Pine64 PinePhone (1.2)
-        items:
-          - const: pine64,pinephone-1.2
+          - enum:
+              - pine64,pinephone-1.0 # Developer Batch (1.0)
+              - pine64,pinephone-1.1 # Braveheart (1.1)
+              - pine64,pinephone-1.2
           - const: pine64,pinephone
           - const: allwinner,sun50i-a64
 
-- 
2.43.0


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

* Re: [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums
  2025-07-06  9:58 [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums Krzysztof Kozlowski
@ 2025-07-06 13:17 ` Chen-Yu Tsai
  2025-07-07  5:31   ` Krzysztof Kozlowski
  2025-07-09 15:57 ` Chen-Yu Tsai
  1 sibling, 1 reply; 4+ messages in thread
From: Chen-Yu Tsai @ 2025-07-06 13:17 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, lukas.schmid

On Sun, Jul 6, 2025 at 5:58 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> The common style in all bindings for enumerating similar variants is to
> use 'enum', not 'oneOf', so all boards of same variant or using same SoM
> should be grouped under enum.  It is more readable, more compact and
> makes easier to find actual devices from the same family/type.  Also
> there is completely no point to repeat the compatible in the description
> (incircuit,icnova-a20-adb4006 implies this is "ICnova A20 ADB4006" and
> pine64,pinephone-1.2 implies "Pine64 PinePhone (1.2)").
>
> Combine two easily visible cases: ICnova A20 and Pine64 PinePhone.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

I can take it through the sunxi tree if you prefer. We do have new
boards coming in this cycle, but I don't think there is any overlap
in the board binding file.

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

* Re: [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums
  2025-07-06 13:17 ` Chen-Yu Tsai
@ 2025-07-07  5:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-07  5:31 UTC (permalink / raw)
  To: wens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, lukas.schmid

On 06/07/2025 15:17, Chen-Yu Tsai wrote:
> On Sun, Jul 6, 2025 at 5:58 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> The common style in all bindings for enumerating similar variants is to
>> use 'enum', not 'oneOf', so all boards of same variant or using same SoM
>> should be grouped under enum.  It is more readable, more compact and
>> makes easier to find actual devices from the same family/type.  Also
>> there is completely no point to repeat the compatible in the description
>> (incircuit,icnova-a20-adb4006 implies this is "ICnova A20 ADB4006" and
>> pine64,pinephone-1.2 implies "Pine64 PinePhone (1.2)").
>>
>> Combine two easily visible cases: ICnova A20 and Pine64 PinePhone.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>
> 
> I can take it through the sunxi tree if you prefer. We do have new
> boards coming in this cycle, but I don't think there is any overlap
> in the board binding file.


Please take it via sunxi tree. This belongs to sunxi SoC.

Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums
  2025-07-06  9:58 [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums Krzysztof Kozlowski
  2025-07-06 13:17 ` Chen-Yu Tsai
@ 2025-07-09 15:57 ` Chen-Yu Tsai
  1 sibling, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2025-07-09 15:57 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, Krzysztof Kozlowski
  Cc: lukas.schmid

On Sun, 06 Jul 2025 11:58:05 +0200, Krzysztof Kozlowski wrote:
> The common style in all bindings for enumerating similar variants is to
> use 'enum', not 'oneOf', so all boards of same variant or using same SoM
> should be grouped under enum.  It is more readable, more compact and
> makes easier to find actual devices from the same family/type.  Also
> there is completely no point to repeat the compatible in the description
> (incircuit,icnova-a20-adb4006 implies this is "ICnova A20 ADB4006" and
> pine64,pinephone-1.2 implies "Pine64 PinePhone (1.2)").
> 
> [...]

Applied to sunxi/dt-for-6.17 in local tree, thanks!

[1/1] dt-bindings: arm: sunxi: Combine board variants into enums
      commit: 9615e017464dfbe72e12e36592b7c5b65e9203fd

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>


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

end of thread, other threads:[~2025-07-09 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06  9:58 [PATCH] dt-bindings: arm: sunxi: Combine board variants into enums Krzysztof Kozlowski
2025-07-06 13:17 ` Chen-Yu Tsai
2025-07-07  5:31   ` Krzysztof Kozlowski
2025-07-09 15:57 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).