summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>2022-04-05 16:55:02 +0900
committerMark Brown <broonie@kernel.org>2022-04-07 18:29:55 +0100
commit2eacc8479c1f6610288f619a23c374502176ca66 (patch)
tree3c645d9cd24e0f9751cc47c13db0d09d40cac95e
parent266d57dd430404e4edbf0a61ed4ad38dce17a056 (diff)
downloadlinux-stable-2eacc8479c1f6610288f619a23c374502176ca66.tar.gz
linux-stable-2eacc8479c1f6610288f619a23c374502176ca66.tar.bz2
linux-stable-2eacc8479c1f6610288f619a23c374502176ca66.zip
regulator: uniphier: 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> Link: https://lore.kernel.org/r/1649145303-30221-2-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml55
1 files changed, 38 insertions, 17 deletions
diff --git a/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml b/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml
index 1218f21ba320..cc40cf72a149 100644
--- a/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml
@@ -14,9 +14,6 @@ description: |
maintainers:
- Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
-allOf:
- - $ref: "regulator.yaml#"
-
# USB3 Controller
properties:
@@ -36,25 +33,49 @@ properties:
minItems: 1
maxItems: 2
- clock-names:
- oneOf:
- - items: # for Pro4, Pro5
- - const: gio
- - const: link
- - items: # for others
- - const: link
+ clock-names: true
resets:
minItems: 1
maxItems: 2
- reset-names:
- oneOf:
- - items: # for Pro4, Pro5
- - const: gio
- - const: link
- - items:
- - const: link
+ reset-names: true
+
+allOf:
+ - $ref: "regulator.yaml#"
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - socionext,uniphier-pro4-usb3-regulator
+ - socionext,uniphier-pro5-usb3-regulator
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ items:
+ - const: gio
+ - const: link
+ resets:
+ minItems: 2
+ maxItems: 2
+ reset-names:
+ items:
+ - const: gio
+ - const: link
+ else:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ const: link
+ resets:
+ maxItems: 1
+ reset-names:
+ const: link
additionalProperties: false