dt-bindings: display: mediatek: Compatible list cleanup
Commit Message
From: Yassine Oudjana <y.oudjana@protonmail.com>
Several DT bindings of MediaTek display blocks make unnecessary use of
"oneOf" and "items", and have some enums with only 1 element. Remove
unnecessary "oneOf" and "items", and replace enums that have 1 element
with "const".
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
.../bindings/display/mediatek/mediatek,aal.yaml | 3 +--
.../display/mediatek/mediatek,ccorr.yaml | 10 ++++------
.../display/mediatek/mediatek,color.yaml | 10 ++++------
.../display/mediatek/mediatek,dither.yaml | 3 +--
.../bindings/display/mediatek/mediatek,dsc.yaml | 4 +---
.../display/mediatek/mediatek,gamma.yaml | 7 +++----
.../display/mediatek/mediatek,merge.yaml | 8 +++-----
.../bindings/display/mediatek/mediatek,od.yaml | 8 +++-----
.../display/mediatek/mediatek,ovl-2l.yaml | 10 ++++------
.../bindings/display/mediatek/mediatek,ovl.yaml | 16 ++++++----------
.../display/mediatek/mediatek,postmask.yaml | 3 +--
.../bindings/display/mediatek/mediatek,rdma.yaml | 13 +++++--------
.../display/mediatek/mediatek,split.yaml | 4 +---
.../bindings/display/mediatek/mediatek,ufoe.yaml | 4 +---
.../bindings/display/mediatek/mediatek,wdma.yaml | 4 +---
15 files changed, 39 insertions(+), 68 deletions(-)
Comments
On 02/03/2023 14:35, Yassine Oudjana wrote:
> From: Yassine Oudjana <y.oudjana@protonmail.com>
>
> Several DT bindings of MediaTek display blocks make unnecessary use of
> "oneOf" and "items", and have some enums with only 1 element. Remove
> unnecessary "oneOf" and "items", and replace enums that have 1 element
> with "const".
>
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
> ---
> .../bindings/display/mediatek/mediatek,aal.yaml | 3 +--
> .../display/mediatek/mediatek,ccorr.yaml | 10 ++++------
> .../display/mediatek/mediatek,color.yaml | 10 ++++------
> .../display/mediatek/mediatek,dither.yaml | 3 +--
> .../bindings/display/mediatek/mediatek,dsc.yaml | 4 +---
> .../display/mediatek/mediatek,gamma.yaml | 7 +++----
> .../display/mediatek/mediatek,merge.yaml | 8 +++-----
> .../bindings/display/mediatek/mediatek,od.yaml | 8 +++-----
> .../display/mediatek/mediatek,ovl-2l.yaml | 10 ++++------
> .../bindings/display/mediatek/mediatek,ovl.yaml | 16 ++++++----------
> .../display/mediatek/mediatek,postmask.yaml | 3 +--
> .../bindings/display/mediatek/mediatek,rdma.yaml | 13 +++++--------
> .../display/mediatek/mediatek,split.yaml | 4 +---
> .../bindings/display/mediatek/mediatek,ufoe.yaml | 4 +---
> .../bindings/display/mediatek/mediatek,wdma.yaml | 4 +---
> 15 files changed, 39 insertions(+), 68 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
> index 92741486c24d..d8d78abd6c6c 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
> @@ -25,8 +25,7 @@ properties:
> - mediatek,mt8173-disp-aal
> - mediatek,mt8183-disp-aal
> - items:
> - - enum:
> - - mediatek,mt2712-disp-aal
> + - const: mediatek,mt2712-disp-aal
This was I think intentional - it will grow. The same in all other
one-enum cases, it might be unnecessary change which soon will be
reverted converting back to enum.
> - const: mediatek,mt8173-disp-aal
> - items:
> - enum:
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml
> index b04820c95b22..e72d2884bb49 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml
> @@ -21,18 +21,16 @@ description: |
> properties:
> compatible:
> oneOf:
> - - items:
> - - const: mediatek,mt8183-disp-ccorr
> - - items:
> - - const: mediatek,mt8192-disp-ccorr
> + - enum:
> + - mediatek,mt8183-disp-ccorr
> + - mediatek,mt8192-disp-ccorr
Such changes are fine.
Best regards,
Krzysztof
@@ -25,8 +25,7 @@ properties:
- mediatek,mt8173-disp-aal
- mediatek,mt8183-disp-aal
- items:
- - enum:
- - mediatek,mt2712-disp-aal
+ - const: mediatek,mt2712-disp-aal
- const: mediatek,mt8173-disp-aal
- items:
- enum:
@@ -21,18 +21,16 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt8183-disp-ccorr
- - items:
- - const: mediatek,mt8192-disp-ccorr
+ - enum:
+ - mediatek,mt8183-disp-ccorr
+ - mediatek,mt8192-disp-ccorr
- items:
- enum:
- mediatek,mt8188-disp-ccorr
- mediatek,mt8195-disp-ccorr
- const: mediatek,mt8192-disp-ccorr
- items:
- - enum:
- - mediatek,mt8186-disp-ccorr
+ - const: mediatek,mt8186-disp-ccorr
- const: mediatek,mt8192-disp-ccorr
reg:
@@ -22,12 +22,10 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt2701-disp-color
- - items:
- - const: mediatek,mt8167-disp-color
- - items:
- - const: mediatek,mt8173-disp-color
+ - enum:
+ - mediatek,mt2701-disp-color
+ - mediatek,mt8167-disp-color
+ - mediatek,mt8173-disp-color
- items:
- enum:
- mediatek,mt7623-disp-color
@@ -22,8 +22,7 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt8183-disp-dither
+ - const: mediatek,mt8183-disp-dither
- items:
- enum:
- mediatek,mt8186-disp-dither
@@ -19,9 +19,7 @@ description: |
properties:
compatible:
- oneOf:
- - items:
- - const: mediatek,mt8195-disp-dsc
+ const: mediatek,mt8195-disp-dsc
reg:
maxItems: 1
@@ -21,10 +21,9 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt8173-disp-gamma
- - items:
- - const: mediatek,mt8183-disp-gamma
+ - enum:
+ - mediatek,mt8173-disp-gamma
+ - mediatek,mt8183-disp-gamma
- items:
- enum:
- mediatek,mt8186-disp-gamma
@@ -20,11 +20,9 @@ description: |
properties:
compatible:
- oneOf:
- - items:
- - const: mediatek,mt8173-disp-merge
- - items:
- - const: mediatek,mt8195-disp-merge
+ enum:
+ - mediatek,mt8173-disp-merge
+ - mediatek,mt8195-disp-merge
reg:
maxItems: 1
@@ -20,11 +20,9 @@ description: |
properties:
compatible:
- oneOf:
- - items:
- - const: mediatek,mt2712-disp-od
- - items:
- - const: mediatek,mt8173-disp-od
+ enum:
+ - mediatek,mt2712-disp-od
+ - mediatek,mt8173-disp-od
reg:
maxItems: 1
@@ -21,13 +21,11 @@ description: |
properties:
compatible:
oneOf:
+ - enum:
+ - mediatek,mt8183-disp-ovl-2l
+ - mediatek,mt8192-disp-ovl-2l
- items:
- - const: mediatek,mt8183-disp-ovl-2l
- - items:
- - const: mediatek,mt8192-disp-ovl-2l
- - items:
- - enum:
- - mediatek,mt8186-disp-ovl-2l
+ - const: mediatek,mt8186-disp-ovl-2l
- const: mediatek,mt8192-disp-ovl-2l
reg:
@@ -21,14 +21,11 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt2701-disp-ovl
- - items:
- - const: mediatek,mt8173-disp-ovl
- - items:
- - const: mediatek,mt8183-disp-ovl
- - items:
- - const: mediatek,mt8192-disp-ovl
+ - enum:
+ - mediatek,mt2701-disp-ovl
+ - mediatek,mt8173-disp-ovl
+ - mediatek,mt8183-disp-ovl
+ - mediatek,mt8192-disp-ovl
- items:
- enum:
- mediatek,mt7623-disp-ovl
@@ -40,8 +37,7 @@ properties:
- mediatek,mt8195-disp-ovl
- const: mediatek,mt8183-disp-ovl
- items:
- - enum:
- - mediatek,mt8186-disp-ovl
+ - const: mediatek,mt8186-disp-ovl
- const: mediatek,mt8192-disp-ovl
reg:
@@ -21,8 +21,7 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt8192-disp-postmask
+ - const: mediatek,mt8192-disp-postmask
- items:
- enum:
- mediatek,mt8186-disp-postmask
@@ -23,14 +23,11 @@ description: |
properties:
compatible:
oneOf:
- - items:
- - const: mediatek,mt2701-disp-rdma
- - items:
- - const: mediatek,mt8173-disp-rdma
- - items:
- - const: mediatek,mt8183-disp-rdma
- - items:
- - const: mediatek,mt8195-disp-rdma
+ - enum:
+ - mediatek,mt2701-disp-rdma
+ - mediatek,mt8173-disp-rdma
+ - mediatek,mt8183-disp-rdma
+ - mediatek,mt8195-disp-rdma
- items:
- enum:
- mediatek,mt8188-disp-rdma
@@ -20,9 +20,7 @@ description: |
properties:
compatible:
- oneOf:
- - items:
- - const: mediatek,mt8173-disp-split
+ const: mediatek,mt8173-disp-split
reg:
maxItems: 1
@@ -21,9 +21,7 @@ description: |
properties:
compatible:
- oneOf:
- - items:
- - const: mediatek,mt8173-disp-ufoe
+ const: mediatek,mt8173-disp-ufoe
reg:
maxItems: 1
@@ -20,9 +20,7 @@ description: |
properties:
compatible:
- oneOf:
- - items:
- - const: mediatek,mt8173-disp-wdma
+ const: mediatek,mt8173-disp-wdma
reg:
maxItems: 1