On Thu, Apr 07, 2022 at 10:22:32AM +0900, Kunihiko Hayashi wrote:
Instead of "oneOf:" choices, use "allOf:" and "if:" to define reg,clocks,
resets, and their names that can be taken by the compatible string.a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
The order of their names doesn't change here.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx>
---
.../pci/socionext,uniphier-pcie-ep.yaml | 84 ++++++++++++-------
1 file changed, 56 insertions(+), 28 deletions(-)
diff --git
b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
index 437e61618d06..49a5b2ca266c 100644a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
---
+++b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
@@ -15,9 +15,6 @@ description: |
maintainers:
- Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx>
-allOf:
- - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
-
properties:
compatible:
enum:
@@ -28,41 +25,19 @@ properties:
minItems: 4
maxItems: 5
- reg-names:
- oneOf:
- - items:
- - const: dbi
- - const: dbi2
- - const: link
- - const: addr_space
- - items:
- - const: dbi
- - const: dbi2
- - const: link
- - const: addr_space
- - const: atu
This could be just:
minItems: 4
items:
- const: dbi
- const: dbi2
- const: link
- const: addr_space
- const: atu
Then the if/then can have just 'minItems: 5' or 'maxItems: 4' for each
case. I prefer the if/then schemas to be minimal.