Skip to content

Commit 086e907

Browse files
committed
dt-bindings: Remove more cases of 'allOf' containing a '$ref'
Another round of 'allOf' removals that came in this cycle. json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. The json-schema library doesn't yet support this, but the tooling now does a fixup for this and either way works. This has been a constant source of review comments, so let's change this treewide so everyone copies the simpler syntax. Signed-off-by: Rob Herring <[email protected]>
1 parent 2dca74a commit 086e907

33 files changed

+224
-316
lines changed

Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ properties:
8585
CPU power good signal from external PMIC to PMC is enabled.
8686

8787
nvidia,suspend-mode:
88-
allOf:
89-
- $ref: /schemas/types.yaml#/definitions/uint32
90-
- enum: [0, 1, 2]
88+
$ref: /schemas/types.yaml#/definitions/uint32
89+
enum: [0, 1, 2]
9190
description:
9291
The suspend mode that the platform should use.
9392
Mode 0 is for LP0, CPU + Core voltage off and DRAM in self-refresh

Documentation/devicetree/bindings/ata/sata_highbank.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,25 @@ properties:
4040
4141
calxeda,led-order:
4242
description: Maps port numbers to offsets within the SGPIO bitstream.
43-
allOf:
44-
- $ref: /schemas/types.yaml#/definitions/uint32-array
45-
- minItems: 1
46-
maxItems: 8
43+
$ref: /schemas/types.yaml#/definitions/uint32-array
44+
minItems: 1
45+
maxItems: 8
4746

4847
calxeda,port-phys:
4948
description: |
5049
phandle-combophy and lane assignment, which maps each SATA port to a
5150
combophy and a lane within that combophy
52-
allOf:
53-
- $ref: /schemas/types.yaml#/definitions/phandle-array
54-
- minItems: 1
55-
maxItems: 8
51+
$ref: /schemas/types.yaml#/definitions/phandle-array
52+
minItems: 1
53+
maxItems: 8
5654

5755
calxeda,tx-atten:
5856
description: |
5957
Contains TX attenuation override codes, one per port.
6058
The upper 24 bits of each entry are always 0 and thus ignored.
61-
allOf:
62-
- $ref: /schemas/types.yaml#/definitions/uint32-array
63-
- minItems: 1
64-
maxItems: 8
59+
$ref: /schemas/types.yaml#/definitions/uint32-array
60+
minItems: 1
61+
maxItems: 8
6562

6663
calxeda,sgpio-gpio:
6764
description: |

Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ patternProperties:
6363

6464
snps,nr-gpios:
6565
description: The number of GPIO pins exported by the port.
66+
$ref: /schemas/types.yaml#/definitions/uint32
6667
default: 32
67-
allOf:
68-
- $ref: /schemas/types.yaml#/definitions/uint32
69-
- minimum: 1
70-
maximum: 32
68+
minimum: 1
69+
maximum: 32
7170

7271
interrupts:
7372
description: |

Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ properties:
6767
1 - direct_sync
6868
2 - scaled_sync
6969
3 - pulse_sync
70-
allOf:
71-
- $ref: /schemas/types.yaml#/definitions/uint32
70+
$ref: /schemas/types.yaml#/definitions/uint32
7271
minimum: 0
7372
maximum: 3
7473

Documentation/devicetree/bindings/iio/light/amstaos,tsl2563.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ properties:
2525

2626
amstaos,cover-comp-gain:
2727
description: Multiplier for gain compensation
28-
allOf:
29-
- $ref: /schemas/types.yaml#/definitions/uint32
30-
- enum: [1, 16]
28+
$ref: /schemas/types.yaml#/definitions/uint32
29+
enum: [1, 16]
3130

3231
required:
3332
- compatible

0 commit comments

Comments
 (0)