Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+75 -75
+3 -3
Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml
··· 14 14 15 15 properties: 16 16 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 20 20 21 21 reg: 22 22 items:
+3 -3
Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml
··· 14 14 15 15 properties: 16 16 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 20 20 21 21 reg: 22 22 items:
+1 -2
Documentation/devicetree/bindings/display/msm/dsi-phy-20nm.yaml
··· 14 14 15 15 properties: 16 16 compatible: 17 - oneOf: 18 - - const: qcom,dsi-phy-20nm 17 + const: qcom,dsi-phy-20nm 19 18 20 19 reg: 21 20 items:
+4 -4
Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
··· 14 14 15 15 properties: 16 16 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 21 21 22 22 reg: 23 23 items:
+6 -6
Documentation/devicetree/bindings/dma/allwinner,sun6i-a31-dma.yaml
··· 19 19 description: The cell is the request line number. 20 20 21 21 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 28 28 29 29 reg: 30 30 maxItems: 1
+3 -3
Documentation/devicetree/bindings/firmware/arm,scpi.yaml
··· 131 131 132 132 properties: 133 133 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 137 137 138 138 '#clock-cells': 139 139 const: 1
+5 -5
Documentation/devicetree/bindings/i2c/ti,omap4-i2c.yaml
··· 72 72 if: 73 73 properties: 74 74 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 80 80 81 81 then: 82 82 properties:
+4 -4
Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
··· 19 19 20 20 properties: 21 21 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 26 26 27 27 reg: 28 28 minItems: 1
+4 -4
Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
··· 83 83 link-frequencies: true 84 84 data-lanes: true 85 85 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 90 90 91 91 required: 92 92 - link-frequencies
+3 -3
Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
··· 11 11 12 12 properties: 13 13 compatible: 14 - oneOf: 15 - - const: ti,lp87565 16 - - const: ti,lp87565-q1 14 + enum: 15 + - ti,lp87565 16 + - ti,lp87565-q1 17 17 18 18 reg: 19 19 description: I2C slave address
+4 -4
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
··· 17 17 18 18 properties: 19 19 compatible: 20 - oneOf: 21 - - const: "realtek,rtl8723bs-bt" 22 - - const: "realtek,rtl8723cs-bt" 23 - - const: "realtek,rtl8822cs-bt" 20 + enum: 21 + - realtek,rtl8723bs-bt 22 + - realtek,rtl8723cs-bt 23 + - realtek,rtl8822cs-bt 24 24 25 25 device-wake-gpios: 26 26 maxItems: 1
+4 -4
Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
··· 53 53 "#size-cells": true 54 54 55 55 compatible: 56 - oneOf: 57 - - const: ti,am654-cpsw-nuss 58 - - const: ti,j721e-cpsw-nuss 59 - - const: ti,am642-cpsw-nuss 56 + enum: 57 + - ti,am654-cpsw-nuss 58 + - ti,j721e-cpsw-nuss 59 + - ti,am642-cpsw-nuss 60 60 61 61 reg: 62 62 maxItems: 1
+3 -3
Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
··· 45 45 pattern: "^cpts@[0-9a-f]+$" 46 46 47 47 compatible: 48 - oneOf: 49 - - const: ti,am65-cpts 50 - - const: ti,j721e-cpts 48 + enum: 49 + - ti,am65-cpts 50 + - ti,j721e-cpts 51 51 52 52 reg: 53 53 maxItems: 1
+4 -4
Documentation/devicetree/bindings/pci/loongson.yaml
··· 17 17 18 18 properties: 19 19 compatible: 20 - oneOf: 21 - - const: loongson,ls2k-pci 22 - - const: loongson,ls7a-pci 23 - - const: loongson,rs780e-pci 20 + enum: 21 + - loongson,ls2k-pci 22 + - loongson,ls7a-pci 23 + - loongson,rs780e-pci 24 24 25 25 reg: 26 26 minItems: 1
+3 -3
Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.yaml
··· 23 23 24 24 properties: 25 25 compatible: 26 - oneOf: 27 - - const: intel,lgm-emmc-phy 28 - - const: intel,keembay-emmc-phy 26 + enum: 27 + - intel,lgm-emmc-phy 28 + - intel,keembay-emmc-phy 29 29 30 30 "#phy-cells": 31 31 const: 0
+5 -4
Documentation/devicetree/bindings/serial/8250_omap.yaml
··· 90 90 if: 91 91 properties: 92 92 compatible: 93 - oneOf: 94 - - const: ti,omap2-uart 95 - - const: ti,omap3-uart 96 - - const: ti,omap4-uart 93 + contains: 94 + enum: 95 + - ti,omap2-uart 96 + - ti,omap3-uart 97 + - ti,omap4-uart 97 98 98 99 then: 99 100 properties:
+3 -3
Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
··· 15 15 16 16 properties: 17 17 compatible: 18 - oneOf: 19 - - const: qcom,sm8250-sndcard 20 - - const: qcom,qrb5165-rb5-sndcard 18 + enum: 19 + - qcom,sm8250-sndcard 20 + - qcom,qrb5165-rb5-sndcard 21 21 22 22 audio-routing: 23 23 $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+4 -4
Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
··· 24 24 25 25 properties: 26 26 compatible: 27 - oneOf: 28 - - const: ti,tlv320adc3140 29 - - const: ti,tlv320adc5140 30 - - const: ti,tlv320adc6140 27 + enum: 28 + - ti,tlv320adc3140 29 + - ti,tlv320adc5140 30 + - ti,tlv320adc6140 31 31 32 32 reg: 33 33 maxItems: 1
+6 -6
Documentation/devicetree/bindings/spi/realtek,rtl-spi.yaml
··· 15 15 16 16 properties: 17 17 compatible: 18 - oneOf: 19 - - const: realtek,rtl8380-spi 20 - - const: realtek,rtl8382-spi 21 - - const: realtek,rtl8391-spi 22 - - const: realtek,rtl8392-spi 23 - - const: realtek,rtl8393-spi 18 + enum: 19 + - realtek,rtl8380-spi 20 + - realtek,rtl8382-spi 21 + - realtek,rtl8391-spi 22 + - realtek,rtl8392-spi 23 + - realtek,rtl8393-spi 24 24 25 25 reg: 26 26 maxItems: 1
+3 -3
Documentation/devicetree/bindings/timer/arm,sp804.yaml
··· 23 23 properties: 24 24 compatible: 25 25 contains: 26 - oneOf: 27 - - const: arm,sp804 28 - - const: hisilicon,sp804 26 + enum: 27 + - arm,sp804 28 + - hisilicon,sp804 29 29 required: 30 30 - compatible 31 31