* [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries
@ 2021-09-10 16:51 Rob Herring
2021-09-10 16:54 ` Mark Brown
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rob Herring @ 2021-09-10 16:51 UTC (permalink / raw)
To: devicetree
Cc: Rob Clark, Sean Paul, Mark Brown, Wim Van Sebroeck,
Guenter Roeck, Jonathan Marek, Aswath Govindraju, Marc Zyngier,
Linus Walleij, dri-devel, freedreno, linux-spi, linux-watchdog
'enum' is equivalent to 'oneOf' with a list of 'const' entries, but 'enum'
is more concise and yields better error messages.
Fix a couple more cases which have appeared.
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Mark Brown <broonie@kernel.org>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jonathan Marek <jonathan@marek.ca>
Cc: Aswath Govindraju <a-govindraju@ti.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: linux-spi@vger.kernel.org
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../bindings/display/msm/dsi-phy-7nm.yaml | 8 ++++----
.../devicetree/bindings/spi/omap-spi.yaml | 6 +++---
.../bindings/watchdog/maxim,max63xx.yaml | 14 +++++++-------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml b/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
index 4265399bb154..c851770bbdf2 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
@@ -14,10 +14,10 @@ allOf:
properties:
compatible:
- oneOf:
- - const: qcom,dsi-phy-7nm
- - const: qcom,dsi-phy-7nm-8150
- - const: qcom,sc7280-dsi-phy-7nm
+ enum:
+ - qcom,dsi-phy-7nm
+ - qcom,dsi-phy-7nm-8150
+ - qcom,sc7280-dsi-phy-7nm
reg:
items:
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.yaml b/Documentation/devicetree/bindings/spi/omap-spi.yaml
index e55538186cf6..9952199cae11 100644
--- a/Documentation/devicetree/bindings/spi/omap-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/omap-spi.yaml
@@ -84,9 +84,9 @@ unevaluatedProperties: false
if:
properties:
compatible:
- oneOf:
- - const: ti,omap2-mcspi
- - const: ti,omap4-mcspi
+ enum:
+ - ti,omap2-mcspi
+ - ti,omap4-mcspi
then:
properties:
diff --git a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
index f2105eedac2c..ab9641e845db 100644
--- a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
+++ b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
@@ -15,13 +15,13 @@ maintainers:
properties:
compatible:
- oneOf:
- - const: maxim,max6369
- - const: maxim,max6370
- - const: maxim,max6371
- - const: maxim,max6372
- - const: maxim,max6373
- - const: maxim,max6374
+ enum:
+ - maxim,max6369
+ - maxim,max6370
+ - maxim,max6371
+ - maxim,max6372
+ - maxim,max6373
+ - maxim,max6374
reg:
description: This is a 1-byte memory-mapped address
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries
2021-09-10 16:51 [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries Rob Herring
@ 2021-09-10 16:54 ` Mark Brown
2021-09-10 17:11 ` Guenter Roeck
2021-09-13 4:32 ` Aswath Govindraju
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-09-10 16:54 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, Rob Clark, Sean Paul, Wim Van Sebroeck,
Guenter Roeck, Jonathan Marek, Aswath Govindraju, Marc Zyngier,
Linus Walleij, dri-devel, freedreno, linux-spi, linux-watchdog
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
On Fri, Sep 10, 2021 at 11:51:53AM -0500, Rob Herring wrote:
> 'enum' is equivalent to 'oneOf' with a list of 'const' entries, but 'enum'
> is more concise and yields better error messages.
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries
2021-09-10 16:51 [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries Rob Herring
2021-09-10 16:54 ` Mark Brown
@ 2021-09-10 17:11 ` Guenter Roeck
2021-09-13 4:32 ` Aswath Govindraju
2 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2021-09-10 17:11 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Rob Clark, Sean Paul, Mark Brown, Wim Van Sebroeck,
Jonathan Marek, Aswath Govindraju, Marc Zyngier, Linus Walleij,
dri-devel, freedreno, linux-spi, linux-watchdog
On 9/10/21 9:51 AM, Rob Herring wrote:
> 'enum' is equivalent to 'oneOf' with a list of 'const' entries, but 'enum'
> is more concise and yields better error messages.
>
> Fix a couple more cases which have appeared.
>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Jonathan Marek <jonathan@marek.ca>
> Cc: Aswath Govindraju <a-govindraju@ti.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: dri-devel@lists.freedesktop.org
> Cc: freedreno@lists.freedesktop.org
> Cc: linux-spi@vger.kernel.org
> Cc: linux-watchdog@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../bindings/display/msm/dsi-phy-7nm.yaml | 8 ++++----
> .../devicetree/bindings/spi/omap-spi.yaml | 6 +++---
> .../bindings/watchdog/maxim,max63xx.yaml | 14 +++++++-------
For watchdog:
Acked-by: Guenter Roeck <linux@roeck-us.net>
> 3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml b/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
> index 4265399bb154..c851770bbdf2 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
> @@ -14,10 +14,10 @@ allOf:
>
> properties:
> compatible:
> - oneOf:
> - - const: qcom,dsi-phy-7nm
> - - const: qcom,dsi-phy-7nm-8150
> - - const: qcom,sc7280-dsi-phy-7nm
> + enum:
> + - qcom,dsi-phy-7nm
> + - qcom,dsi-phy-7nm-8150
> + - qcom,sc7280-dsi-phy-7nm
>
> reg:
> items:
> diff --git a/Documentation/devicetree/bindings/spi/omap-spi.yaml b/Documentation/devicetree/bindings/spi/omap-spi.yaml
> index e55538186cf6..9952199cae11 100644
> --- a/Documentation/devicetree/bindings/spi/omap-spi.yaml
> +++ b/Documentation/devicetree/bindings/spi/omap-spi.yaml
> @@ -84,9 +84,9 @@ unevaluatedProperties: false
> if:
> properties:
> compatible:
> - oneOf:
> - - const: ti,omap2-mcspi
> - - const: ti,omap4-mcspi
> + enum:
> + - ti,omap2-mcspi
> + - ti,omap4-mcspi
>
> then:
> properties:
> diff --git a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
> index f2105eedac2c..ab9641e845db 100644
> --- a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
> @@ -15,13 +15,13 @@ maintainers:
>
> properties:
> compatible:
> - oneOf:
> - - const: maxim,max6369
> - - const: maxim,max6370
> - - const: maxim,max6371
> - - const: maxim,max6372
> - - const: maxim,max6373
> - - const: maxim,max6374
> + enum:
> + - maxim,max6369
> + - maxim,max6370
> + - maxim,max6371
> + - maxim,max6372
> + - maxim,max6373
> + - maxim,max6374
>
> reg:
> description: This is a 1-byte memory-mapped address
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries
2021-09-10 16:51 [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries Rob Herring
2021-09-10 16:54 ` Mark Brown
2021-09-10 17:11 ` Guenter Roeck
@ 2021-09-13 4:32 ` Aswath Govindraju
2 siblings, 0 replies; 4+ messages in thread
From: Aswath Govindraju @ 2021-09-13 4:32 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Rob Clark, Sean Paul, Mark Brown, Wim Van Sebroeck,
Guenter Roeck, Jonathan Marek, Marc Zyngier, Linus Walleij,
dri-devel, freedreno, linux-spi, linux-watchdog
On 10/09/21 10:21 pm, Rob Herring wrote:
> 'enum' is equivalent to 'oneOf' with a list of 'const' entries, but 'enum'
> is more concise and yields better error messages.
>
> Fix a couple more cases which have appeared.
>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Jonathan Marek <jonathan@marek.ca>
> Cc: Aswath Govindraju <a-govindraju@ti.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: dri-devel@lists.freedesktop.org
> Cc: freedreno@lists.freedesktop.org
> Cc: linux-spi@vger.kernel.org
> Cc: linux-watchdog@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../bindings/display/msm/dsi-phy-7nm.yaml | 8 ++++----
> .../devicetree/bindings/spi/omap-spi.yaml | 6 +++---
For omap-spi:
Acked-by: Aswath Govindraju <a-govindraju@ti.com>
> .../bindings/watchdog/maxim,max63xx.yaml | 14 +++++++-------
> 3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml b/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
> index 4265399bb154..c851770bbdf2 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
> @@ -14,10 +14,10 @@ allOf:
>
> properties:
> compatible:
> - oneOf:
> - - const: qcom,dsi-phy-7nm
> - - const: qcom,dsi-phy-7nm-8150
> - - const: qcom,sc7280-dsi-phy-7nm
> + enum:
> + - qcom,dsi-phy-7nm
> + - qcom,dsi-phy-7nm-8150
> + - qcom,sc7280-dsi-phy-7nm
>
> reg:
> items:
> diff --git a/Documentation/devicetree/bindings/spi/omap-spi.yaml b/Documentation/devicetree/bindings/spi/omap-spi.yaml
> index e55538186cf6..9952199cae11 100644
> --- a/Documentation/devicetree/bindings/spi/omap-spi.yaml
> +++ b/Documentation/devicetree/bindings/spi/omap-spi.yaml
> @@ -84,9 +84,9 @@ unevaluatedProperties: false
> if:
> properties:
> compatible:
> - oneOf:
> - - const: ti,omap2-mcspi
> - - const: ti,omap4-mcspi
> + enum:
> + - ti,omap2-mcspi
> + - ti,omap4-mcspi
>
> then:
> properties:
> diff --git a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
> index f2105eedac2c..ab9641e845db 100644
> --- a/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
> @@ -15,13 +15,13 @@ maintainers:
>
> properties:
> compatible:
> - oneOf:
> - - const: maxim,max6369
> - - const: maxim,max6370
> - - const: maxim,max6371
> - - const: maxim,max6372
> - - const: maxim,max6373
> - - const: maxim,max6374
> + enum:
> + - maxim,max6369
> + - maxim,max6370
> + - maxim,max6371
> + - maxim,max6372
> + - maxim,max6373
> + - maxim,max6374
>
> reg:
> description: This is a 1-byte memory-mapped address
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-13 4:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 16:51 [PATCH] dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries Rob Herring
2021-09-10 16:54 ` Mark Brown
2021-09-10 17:11 ` Guenter Roeck
2021-09-13 4:32 ` Aswath Govindraju
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).