Skip to content

Commit 5f0b06d

Browse files
committed
dt-bindings: Remove more cases of 'allOf' containing a '$ref'
Another wack-a-mole pass of killing off unnecessary 'allOf + $ref' usage. 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 f516fb7 commit 5f0b06d

File tree

12 files changed

+49
-70
lines changed

12 files changed

+49
-70
lines changed

Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ properties:
3232
- const: hdmi
3333

3434
ddc:
35-
allOf:
36-
- $ref: /schemas/types.yaml#/definitions/phandle
35+
$ref: /schemas/types.yaml#/definitions/phandle
3736
description: >
3837
Phandle of the I2C controller used for DDC EDID probing
3938

Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ patternProperties:
9797
input signal is multiplied. For example, <1 3> indicates the signal is scaled
9898
down to 1/3 of its value before ADC measurement.
9999
If property is not found default value depending on chip will be used.
100-
allOf:
101-
- $ref: /schemas/types.yaml#/definitions/uint32-array
100+
$ref: /schemas/types.yaml#/definitions/uint32-array
102101
oneOf:
103102
- items:
104103
- const: 1

Documentation/devicetree/bindings/interrupt-controller/mti,gic.yaml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,26 @@ properties:
4242
Specifies the list of CPU interrupt vectors to which the GIC may not
4343
route interrupts. This property is ignored if the CPU is started in EIC
4444
mode.
45-
allOf:
46-
- $ref: /schemas/types.yaml#definitions/uint32-array
47-
- minItems: 1
48-
maxItems: 6
49-
uniqueItems: true
50-
items:
51-
minimum: 2
52-
maximum: 7
45+
$ref: /schemas/types.yaml#definitions/uint32-array
46+
minItems: 1
47+
maxItems: 6
48+
uniqueItems: true
49+
items:
50+
minimum: 2
51+
maximum: 7
5352

5453
mti,reserved-ipi-vectors:
5554
description: |
5655
Specifies the range of GIC interrupts that are reserved for IPIs.
5756
It accepts two values: the 1st is the starting interrupt and the 2nd is
5857
the size of the reserved range. If not specified, the driver will
5958
allocate the last (2 * number of VPEs in the system).
60-
allOf:
61-
- $ref: /schemas/types.yaml#definitions/uint32-array
62-
- items:
63-
- minimum: 0
64-
maximum: 254
65-
- minimum: 2
66-
maximum: 254
59+
$ref: /schemas/types.yaml#definitions/uint32-array
60+
items:
61+
- minimum: 0
62+
maximum: 254
63+
- minimum: 2
64+
maximum: 254
6765

6866
timer:
6967
type: object

Documentation/devicetree/bindings/media/i2c/dongwoon,dw9768.yaml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,36 @@ properties:
3838
dongwoon,aac-mode:
3939
description:
4040
Indication of AAC mode select.
41-
allOf:
42-
- $ref: "/schemas/types.yaml#/definitions/uint32"
43-
- enum:
44-
- 1 # AAC2 mode(operation time# 0.48 x Tvib)
45-
- 2 # AAC3 mode(operation time# 0.70 x Tvib)
46-
- 3 # AAC4 mode(operation time# 0.75 x Tvib)
47-
- 5 # AAC8 mode(operation time# 1.13 x Tvib)
48-
default: 2
41+
$ref: "/schemas/types.yaml#/definitions/uint32"
42+
enum:
43+
- 1 # AAC2 mode(operation time# 0.48 x Tvib)
44+
- 2 # AAC3 mode(operation time# 0.70 x Tvib)
45+
- 3 # AAC4 mode(operation time# 0.75 x Tvib)
46+
- 5 # AAC8 mode(operation time# 1.13 x Tvib)
47+
default: 2
4948

5049
dongwoon,aac-timing:
5150
description:
5251
Number of AAC Timing count that controlled by one 6-bit period of
5352
vibration register AACT[5:0], the unit of which is 100 us.
54-
allOf:
55-
- $ref: "/schemas/types.yaml#/definitions/uint32"
56-
- default: 0x20
57-
minimum: 0x00
58-
maximum: 0x3f
53+
$ref: "/schemas/types.yaml#/definitions/uint32"
54+
default: 0x20
55+
minimum: 0x00
56+
maximum: 0x3f
5957

6058
dongwoon,clock-presc:
6159
description:
6260
Indication of VCM internal clock dividing rate select, as one multiple
6361
factor to calculate VCM ring periodic time Tvib.
64-
allOf:
65-
- $ref: "/schemas/types.yaml#/definitions/uint32"
66-
- enum:
67-
- 0 # Dividing Rate - 2
68-
- 1 # Dividing Rate - 1
69-
- 2 # Dividing Rate - 1/2
70-
- 3 # Dividing Rate - 1/4
71-
- 4 # Dividing Rate - 8
72-
- 5 # Dividing Rate - 4
73-
default: 1
62+
$ref: "/schemas/types.yaml#/definitions/uint32"
63+
enum:
64+
- 0 # Dividing Rate - 2
65+
- 1 # Dividing Rate - 1
66+
- 2 # Dividing Rate - 1/2
67+
- 3 # Dividing Rate - 1/4
68+
- 4 # Dividing Rate - 8
69+
- 5 # Dividing Rate - 4
70+
default: 1
7471

7572
required:
7673
- compatible

Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ properties:
3131
ti,syscon-pcie-ctrl:
3232
description: Phandle to the SYSCON entry required for configuring PCIe mode
3333
and link speed.
34-
allOf:
35-
- $ref: /schemas/types.yaml#/definitions/phandle
34+
$ref: /schemas/types.yaml#/definitions/phandle
3635

3736
power-domains:
3837
maxItems: 1

Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ properties:
3131
ti,syscon-pcie-ctrl:
3232
description: Phandle to the SYSCON entry required for configuring PCIe mode
3333
and link speed.
34-
allOf:
35-
- $ref: /schemas/types.yaml#/definitions/phandle
34+
$ref: /schemas/types.yaml#/definitions/phandle
3635

3736
power-domains:
3837
maxItems: 1

Documentation/devicetree/bindings/sound/maxim,max98390.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ properties:
1818
description: I2C address of the device.
1919

2020
maxim,temperature_calib:
21-
allOf:
22-
- $ref: /schemas/types.yaml#/definitions/uint32
2321
description: The calculated temperature data was measured while doing the calibration.
22+
$ref: /schemas/types.yaml#/definitions/uint32
2423
minimum: 0
2524
maximum: 65535
2625

2726
maxim,r0_calib:
28-
allOf:
29-
- $ref: /schemas/types.yaml#/definitions/uint32
3027
description: This is r0 calibration data which was measured in factory mode.
28+
$ref: /schemas/types.yaml#/definitions/uint32
3129
minimum: 1
3230
maximum: 8388607
3331

Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ properties:
4848

4949
sound-name-prefix:
5050
pattern: "^DSPK[1-9]$"
51-
allOf:
52-
- $ref: /schemas/types.yaml#/definitions/string
51+
$ref: /schemas/types.yaml#/definitions/string
5352
description:
5453
Used as prefix for sink/source names of the component. Must be a
5554
unique string among multiple instances of the same component.

Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ properties:
4949

5050
sound-name-prefix:
5151
pattern: "^DMIC[1-9]$"
52-
allOf:
53-
- $ref: /schemas/types.yaml#/definitions/string
52+
$ref: /schemas/types.yaml#/definitions/string
5453
description:
5554
used as prefix for sink/source names of the component. Must be a
5655
unique string among multiple instances of the same component.

Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ properties:
6767

6868
sound-name-prefix:
6969
pattern: "^I2S[1-9]$"
70-
allOf:
71-
- $ref: /schemas/types.yaml#/definitions/string
70+
$ref: /schemas/types.yaml#/definitions/string
7271
description:
7372
Used as prefix for sink/source names of the component. Must be a
7473
unique string among multiple instances of the same component.

0 commit comments

Comments
 (0)