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 <mripard@kernel.org> Cc: Vignesh R <vigneshr@ti.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: dmaengine@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: linux-phy@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-spi@vger.kernel.org Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> (mipi-ccs) Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Acked-By: Vinod Koul <vkoul@kernel.org> Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210824202014.978922-1-robh@kernel.org
This commit is contained in:
parent
13b11b316f
commit
1c3ac086fd
|
@ -14,9 +14,9 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: qcom,dsi-phy-10nm
|
- qcom,dsi-phy-10nm
|
||||||
- const: qcom,dsi-phy-10nm-8998
|
- qcom,dsi-phy-10nm-8998
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
items:
|
items:
|
||||||
|
|
|
@ -14,9 +14,9 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: qcom,dsi-phy-14nm
|
- qcom,dsi-phy-14nm
|
||||||
- const: qcom,dsi-phy-14nm-660
|
- qcom,dsi-phy-14nm-660
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
items:
|
items:
|
||||||
|
|
|
@ -14,8 +14,7 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
const: qcom,dsi-phy-20nm
|
||||||
- const: qcom,dsi-phy-20nm
|
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
items:
|
items:
|
||||||
|
|
|
@ -14,10 +14,10 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: qcom,dsi-phy-28nm-hpm
|
- qcom,dsi-phy-28nm-hpm
|
||||||
- const: qcom,dsi-phy-28nm-lp
|
- qcom,dsi-phy-28nm-lp
|
||||||
- const: qcom,dsi-phy-28nm-8960
|
- qcom,dsi-phy-28nm-8960
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
items:
|
items:
|
||||||
|
|
|
@ -19,12 +19,12 @@ properties:
|
||||||
description: The cell is the request line number.
|
description: The cell is the request line number.
|
||||||
|
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: allwinner,sun6i-a31-dma
|
- allwinner,sun6i-a31-dma
|
||||||
- const: allwinner,sun8i-a23-dma
|
- allwinner,sun8i-a23-dma
|
||||||
- const: allwinner,sun8i-a83t-dma
|
- allwinner,sun8i-a83t-dma
|
||||||
- const: allwinner,sun8i-h3-dma
|
- allwinner,sun8i-h3-dma
|
||||||
- const: allwinner,sun8i-v3s-dma
|
- allwinner,sun8i-v3s-dma
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
|
@ -131,9 +131,9 @@ properties:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: arm,scpi-dvfs-clocks
|
- arm,scpi-dvfs-clocks
|
||||||
- const: arm,scpi-variable-clocks
|
- arm,scpi-variable-clocks
|
||||||
|
|
||||||
'#clock-cells':
|
'#clock-cells':
|
||||||
const: 1
|
const: 1
|
||||||
|
|
|
@ -72,11 +72,11 @@ additionalProperties: false
|
||||||
if:
|
if:
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: ti,omap2420-i2c
|
- ti,omap2420-i2c
|
||||||
- const: ti,omap2430-i2c
|
- ti,omap2430-i2c
|
||||||
- const: ti,omap3-i2c
|
- ti,omap3-i2c
|
||||||
- const: ti,omap4-i2c
|
- ti,omap4-i2c
|
||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -19,10 +19,10 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: loongson,liointc-1.0
|
- loongson,liointc-1.0
|
||||||
- const: loongson,liointc-1.0a
|
- loongson,liointc-1.0a
|
||||||
- const: loongson,liointc-2.0
|
- loongson,liointc-2.0
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
|
|
|
@ -83,10 +83,10 @@ properties:
|
||||||
link-frequencies: true
|
link-frequencies: true
|
||||||
data-lanes: true
|
data-lanes: true
|
||||||
bus-type:
|
bus-type:
|
||||||
oneOf:
|
enum:
|
||||||
- const: 1 # CSI-2 C-PHY
|
- 1 # CSI-2 C-PHY
|
||||||
- const: 3 # CCP2
|
- 3 # CCP2
|
||||||
- const: 4 # CSI-2 D-PHY
|
- 4 # CSI-2 D-PHY
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- link-frequencies
|
- link-frequencies
|
||||||
|
|
|
@ -11,9 +11,9 @@ maintainers:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: ti,lp87565
|
- ti,lp87565
|
||||||
- const: ti,lp87565-q1
|
- ti,lp87565-q1
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
description: I2C slave address
|
description: I2C slave address
|
||||||
|
|
|
@ -17,10 +17,10 @@ description:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: "realtek,rtl8723bs-bt"
|
- realtek,rtl8723bs-bt
|
||||||
- const: "realtek,rtl8723cs-bt"
|
- realtek,rtl8723cs-bt
|
||||||
- const: "realtek,rtl8822cs-bt"
|
- realtek,rtl8822cs-bt
|
||||||
|
|
||||||
device-wake-gpios:
|
device-wake-gpios:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
|
@ -53,10 +53,10 @@ properties:
|
||||||
"#size-cells": true
|
"#size-cells": true
|
||||||
|
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: ti,am654-cpsw-nuss
|
- ti,am654-cpsw-nuss
|
||||||
- const: ti,j721e-cpsw-nuss
|
- ti,j721e-cpsw-nuss
|
||||||
- const: ti,am642-cpsw-nuss
|
- ti,am642-cpsw-nuss
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
|
@ -45,9 +45,9 @@ properties:
|
||||||
pattern: "^cpts@[0-9a-f]+$"
|
pattern: "^cpts@[0-9a-f]+$"
|
||||||
|
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: ti,am65-cpts
|
- ti,am65-cpts
|
||||||
- const: ti,j721e-cpts
|
- ti,j721e-cpts
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
|
@ -17,10 +17,10 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: loongson,ls2k-pci
|
- loongson,ls2k-pci
|
||||||
- const: loongson,ls7a-pci
|
- loongson,ls7a-pci
|
||||||
- const: loongson,rs780e-pci
|
- loongson,rs780e-pci
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
|
|
|
@ -23,9 +23,9 @@ description: |+
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: intel,lgm-emmc-phy
|
- intel,lgm-emmc-phy
|
||||||
- const: intel,keembay-emmc-phy
|
- intel,keembay-emmc-phy
|
||||||
|
|
||||||
"#phy-cells":
|
"#phy-cells":
|
||||||
const: 0
|
const: 0
|
||||||
|
|
|
@ -90,10 +90,11 @@ additionalProperties: false
|
||||||
if:
|
if:
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
contains:
|
||||||
- const: ti,omap2-uart
|
enum:
|
||||||
- const: ti,omap3-uart
|
- ti,omap2-uart
|
||||||
- const: ti,omap4-uart
|
- ti,omap3-uart
|
||||||
|
- ti,omap4-uart
|
||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -15,9 +15,9 @@ description:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: qcom,sm8250-sndcard
|
- qcom,sm8250-sndcard
|
||||||
- const: qcom,qrb5165-rb5-sndcard
|
- qcom,qrb5165-rb5-sndcard
|
||||||
|
|
||||||
audio-routing:
|
audio-routing:
|
||||||
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
||||||
|
|
|
@ -24,10 +24,10 @@ description: |
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: ti,tlv320adc3140
|
- ti,tlv320adc3140
|
||||||
- const: ti,tlv320adc5140
|
- ti,tlv320adc5140
|
||||||
- const: ti,tlv320adc6140
|
- ti,tlv320adc6140
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
|
@ -15,12 +15,12 @@ allOf:
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
enum:
|
||||||
- const: realtek,rtl8380-spi
|
- realtek,rtl8380-spi
|
||||||
- const: realtek,rtl8382-spi
|
- realtek,rtl8382-spi
|
||||||
- const: realtek,rtl8391-spi
|
- realtek,rtl8391-spi
|
||||||
- const: realtek,rtl8392-spi
|
- realtek,rtl8392-spi
|
||||||
- const: realtek,rtl8393-spi
|
- realtek,rtl8393-spi
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
|
@ -23,9 +23,9 @@ select:
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
contains:
|
contains:
|
||||||
oneOf:
|
enum:
|
||||||
- const: arm,sp804
|
- arm,sp804
|
||||||
- const: hisilicon,sp804
|
- hisilicon,sp804
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue