Skip to content

Commit 112d556

Browse files
krzkrobherring
authored andcommitted
dt-bindings: display: mediatek: simplify compatibles syntax
Lists (items) with one item should be just enum because it is shorter, simpler and does not confuse, if one wants to add new entry with a fallback. Convert all of them to enums. OTOH, leave unused "oneOf" entries in anticipation of further growth of the entire binding. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20230414083311.12197-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring <robh@kernel.org>
1 parent a31a6c2 commit 112d556

14 files changed

Lines changed: 41 additions & 54 deletions

Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt8183-disp-ccorr
26-
- items:
27-
- const: mediatek,mt8192-disp-ccorr
24+
- enum:
25+
- mediatek,mt8183-disp-ccorr
26+
- mediatek,mt8192-disp-ccorr
2827
- items:
2928
- enum:
3029
- mediatek,mt8188-disp-ccorr

Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ description: |
2222
properties:
2323
compatible:
2424
oneOf:
25-
- items:
26-
- const: mediatek,mt2701-disp-color
27-
- items:
28-
- const: mediatek,mt8167-disp-color
29-
- items:
30-
- const: mediatek,mt8173-disp-color
25+
- enum:
26+
- mediatek,mt2701-disp-color
27+
- mediatek,mt8167-disp-color
28+
- mediatek,mt8173-disp-color
3129
- items:
3230
- enum:
3331
- mediatek,mt7623-disp-color

Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ description: |
2222
properties:
2323
compatible:
2424
oneOf:
25-
- items:
26-
- const: mediatek,mt8183-disp-dither
25+
- enum:
26+
- mediatek,mt8183-disp-dither
2727
- items:
2828
- enum:
2929
- mediatek,mt8186-disp-dither

Documentation/devicetree/bindings/display/mediatek/mediatek,dsc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ description: |
2020
properties:
2121
compatible:
2222
oneOf:
23-
- items:
24-
- const: mediatek,mt8195-disp-dsc
23+
- enum:
24+
- mediatek,mt8195-disp-dsc
2525

2626
reg:
2727
maxItems: 1

Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt8173-disp-gamma
26-
- items:
27-
- const: mediatek,mt8183-disp-gamma
24+
- enum:
25+
- mediatek,mt8173-disp-gamma
26+
- mediatek,mt8183-disp-gamma
2827
- items:
2928
- enum:
3029
- mediatek,mt8186-disp-gamma

Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt8173-disp-merge
26-
- items:
27-
- const: mediatek,mt8195-disp-merge
24+
- enum:
25+
- mediatek,mt8173-disp-merge
26+
- mediatek,mt8195-disp-merge
2827

2928
reg:
3029
maxItems: 1

Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt2712-disp-od
26-
- items:
27-
- const: mediatek,mt8173-disp-od
24+
- enum:
25+
- mediatek,mt2712-disp-od
26+
- mediatek,mt8173-disp-od
2827

2928
reg:
3029
maxItems: 1

Documentation/devicetree/bindings/display/mediatek/mediatek,ovl-2l.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt8183-disp-ovl-2l
26-
- items:
27-
- const: mediatek,mt8192-disp-ovl-2l
24+
- enum:
25+
- mediatek,mt8183-disp-ovl-2l
26+
- mediatek,mt8192-disp-ovl-2l
2827
- items:
2928
- enum:
3029
- mediatek,mt8186-disp-ovl-2l

Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt2701-disp-ovl
26-
- items:
27-
- const: mediatek,mt8173-disp-ovl
28-
- items:
29-
- const: mediatek,mt8183-disp-ovl
30-
- items:
31-
- const: mediatek,mt8192-disp-ovl
24+
- enum:
25+
- mediatek,mt2701-disp-ovl
26+
- mediatek,mt8173-disp-ovl
27+
- mediatek,mt8183-disp-ovl
28+
- mediatek,mt8192-disp-ovl
3229
- items:
3330
- enum:
3431
- mediatek,mt7623-disp-ovl

Documentation/devicetree/bindings/display/mediatek/mediatek,postmask.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ description: |
2121
properties:
2222
compatible:
2323
oneOf:
24-
- items:
25-
- const: mediatek,mt8192-disp-postmask
24+
- enum:
25+
- mediatek,mt8192-disp-postmask
2626
- items:
2727
- enum:
2828
- mediatek,mt8186-disp-postmask

0 commit comments

Comments
 (0)