Skip to content

Commit

Permalink
dt-bindings: More use 'enum' instead of 'oneOf' plus 'const' entries
Browse files Browse the repository at this point in the history
'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 <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Jonathan Marek <[email protected]>
Cc: Aswath Govindraju <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
robherring committed Sep 10, 2021
1 parent 4a48b66 commit 9756712
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions Documentation/devicetree/bindings/spi/omap-spi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9756712

Please sign in to comment.