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

dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string

Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks,
resets, and their names that can be taken by the compatible string.

The order of clock-names and reset-names doesn't change here.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/1649145378-30358-1-git-send-email-hayashi.kunihiko@socionext.com

authored by

Kunihiko Hayashi and committed by
Philipp Zabel
edb9bd8f 9fe7dd4e

+38 -14
+38 -14
Documentation/devicetree/bindings/reset/socionext,uniphier-glue-reset.yaml
··· 38 38 minItems: 1 39 39 maxItems: 2 40 40 41 - clock-names: 42 - oneOf: 43 - - items: # for Pro4, Pro5 44 - - const: gio 45 - - const: link 46 - - items: # for others 47 - - const: link 41 + clock-names: true 48 42 49 43 resets: 50 44 minItems: 1 51 45 maxItems: 2 52 46 53 - reset-names: 54 - oneOf: 55 - - items: # for Pro4, Pro5 56 - - const: gio 57 - - const: link 58 - - items: # for others 59 - - const: link 47 + reset-names: true 48 + 49 + allOf: 50 + - if: 51 + properties: 52 + compatible: 53 + contains: 54 + enum: 55 + - socionext,uniphier-pro4-usb3-reset 56 + - socionext,uniphier-pro5-usb3-reset 57 + - socionext,uniphier-pro4-ahci-reset 58 + then: 59 + properties: 60 + clocks: 61 + minItems: 2 62 + maxItems: 2 63 + clock-names: 64 + items: 65 + - const: gio 66 + - const: link 67 + resets: 68 + minItems: 2 69 + maxItems: 2 70 + reset-names: 71 + items: 72 + - const: gio 73 + - const: link 74 + else: 75 + properties: 76 + clocks: 77 + maxItems: 1 78 + clock-names: 79 + const: link 80 + resets: 81 + maxItems: 1 82 + reset-names: 83 + const: link 60 84 61 85 additionalProperties: false 62 86