Skip to content

Commit 1c3ac08

Browse files
committed
dt-bindings: Use 'enum' instead of 'oneOf' plus 'const' entries
'enum' is equivalent to 'oneOf' with a list of 'const' entries, but 'enum' is more concise and yields better error messages. Cc: Maxime Ripard <[email protected]> Cc: Vignesh R <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Lee Jones <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Sakari Ailus <[email protected]> (mipi-ccs) Acked-by: Mark Brown <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Acked-By: Vinod Koul <[email protected]> Acked-by: Wolfram Sang <[email protected]> # for I2C Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 13b11b3 commit 1c3ac08

20 files changed

+75
-75
lines changed

Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ allOf:
1414

1515
properties:
1616
compatible:
17-
oneOf:
18-
- const: qcom,dsi-phy-10nm
19-
- const: qcom,dsi-phy-10nm-8998
17+
enum:
18+
- qcom,dsi-phy-10nm
19+
- qcom,dsi-phy-10nm-8998
2020

2121
reg:
2222
items:

Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ allOf:
1414

1515
properties:
1616
compatible:
17-
oneOf:
18-
- const: qcom,dsi-phy-14nm
19-
- const: qcom,dsi-phy-14nm-660
17+
enum:
18+
- qcom,dsi-phy-14nm
19+
- qcom,dsi-phy-14nm-660
2020

2121
reg:
2222
items:

Documentation/devicetree/bindings/display/msm/dsi-phy-20nm.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ allOf:
1414

1515
properties:
1616
compatible:
17-
oneOf:
18-
- const: qcom,dsi-phy-20nm
17+
const: qcom,dsi-phy-20nm
1918

2019
reg:
2120
items:

Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ allOf:
1414

1515
properties:
1616
compatible:
17-
oneOf:
18-
- const: qcom,dsi-phy-28nm-hpm
19-
- const: qcom,dsi-phy-28nm-lp
20-
- const: qcom,dsi-phy-28nm-8960
17+
enum:
18+
- qcom,dsi-phy-28nm-hpm
19+
- qcom,dsi-phy-28nm-lp
20+
- qcom,dsi-phy-28nm-8960
2121

2222
reg:
2323
items:

Documentation/devicetree/bindings/dma/allwinner,sun6i-a31-dma.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ properties:
1919
description: The cell is the request line number.
2020

2121
compatible:
22-
oneOf:
23-
- const: allwinner,sun6i-a31-dma
24-
- const: allwinner,sun8i-a23-dma
25-
- const: allwinner,sun8i-a83t-dma
26-
- const: allwinner,sun8i-h3-dma
27-
- const: allwinner,sun8i-v3s-dma
22+
enum:
23+
- allwinner,sun6i-a31-dma
24+
- allwinner,sun8i-a23-dma
25+
- allwinner,sun8i-a83t-dma
26+
- allwinner,sun8i-h3-dma
27+
- allwinner,sun8i-v3s-dma
2828

2929
reg:
3030
maxItems: 1

Documentation/devicetree/bindings/firmware/arm,scpi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ properties:
131131
132132
properties:
133133
compatible:
134-
oneOf:
135-
- const: arm,scpi-dvfs-clocks
136-
- const: arm,scpi-variable-clocks
134+
enum:
135+
- arm,scpi-dvfs-clocks
136+
- arm,scpi-variable-clocks
137137

138138
'#clock-cells':
139139
const: 1

Documentation/devicetree/bindings/i2c/ti,omap4-i2c.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ additionalProperties: false
7272
if:
7373
properties:
7474
compatible:
75-
oneOf:
76-
- const: ti,omap2420-i2c
77-
- const: ti,omap2430-i2c
78-
- const: ti,omap3-i2c
79-
- const: ti,omap4-i2c
75+
enum:
76+
- ti,omap2420-i2c
77+
- ti,omap2430-i2c
78+
- ti,omap3-i2c
79+
- ti,omap4-i2c
8080

8181
then:
8282
properties:

Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ allOf:
1919

2020
properties:
2121
compatible:
22-
oneOf:
23-
- const: loongson,liointc-1.0
24-
- const: loongson,liointc-1.0a
25-
- const: loongson,liointc-2.0
22+
enum:
23+
- loongson,liointc-1.0
24+
- loongson,liointc-1.0a
25+
- loongson,liointc-2.0
2626

2727
reg:
2828
minItems: 1

Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ properties:
8383
link-frequencies: true
8484
data-lanes: true
8585
bus-type:
86-
oneOf:
87-
- const: 1 # CSI-2 C-PHY
88-
- const: 3 # CCP2
89-
- const: 4 # CSI-2 D-PHY
86+
enum:
87+
- 1 # CSI-2 C-PHY
88+
- 3 # CCP2
89+
- 4 # CSI-2 D-PHY
9090

9191
required:
9292
- link-frequencies

Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ maintainers:
1111

1212
properties:
1313
compatible:
14-
oneOf:
15-
- const: ti,lp87565
16-
- const: ti,lp87565-q1
14+
enum:
15+
- ti,lp87565
16+
- ti,lp87565-q1
1717

1818
reg:
1919
description: I2C slave address

0 commit comments

Comments
 (0)