Commit 5f0b06da authored by Rob Herring's avatar Rob Herring

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: default avatarRob Herring <robh@kernel.org>
parent f516fb70
...@@ -32,8 +32,7 @@ properties: ...@@ -32,8 +32,7 @@ properties:
- const: hdmi - const: hdmi
ddc: ddc:
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
description: > description: >
Phandle of the I2C controller used for DDC EDID probing Phandle of the I2C controller used for DDC EDID probing
......
...@@ -97,8 +97,7 @@ patternProperties: ...@@ -97,8 +97,7 @@ patternProperties:
input signal is multiplied. For example, <1 3> indicates the signal is scaled input signal is multiplied. For example, <1 3> indicates the signal is scaled
down to 1/3 of its value before ADC measurement. down to 1/3 of its value before ADC measurement.
If property is not found default value depending on chip will be used. If property is not found default value depending on chip will be used.
allOf: $ref: /schemas/types.yaml#/definitions/uint32-array
- $ref: /schemas/types.yaml#/definitions/uint32-array
oneOf: oneOf:
- items: - items:
- const: 1 - const: 1
......
...@@ -42,14 +42,13 @@ properties: ...@@ -42,14 +42,13 @@ properties:
Specifies the list of CPU interrupt vectors to which the GIC may not Specifies the list of CPU interrupt vectors to which the GIC may not
route interrupts. This property is ignored if the CPU is started in EIC route interrupts. This property is ignored if the CPU is started in EIC
mode. mode.
allOf: $ref: /schemas/types.yaml#definitions/uint32-array
- $ref: /schemas/types.yaml#definitions/uint32-array minItems: 1
- minItems: 1 maxItems: 6
maxItems: 6 uniqueItems: true
uniqueItems: true items:
items: minimum: 2
minimum: 2 maximum: 7
maximum: 7
mti,reserved-ipi-vectors: mti,reserved-ipi-vectors:
description: | description: |
...@@ -57,13 +56,12 @@ properties: ...@@ -57,13 +56,12 @@ properties:
It accepts two values: the 1st is the starting interrupt and the 2nd is It accepts two values: the 1st is the starting interrupt and the 2nd is
the size of the reserved range. If not specified, the driver will the size of the reserved range. If not specified, the driver will
allocate the last (2 * number of VPEs in the system). allocate the last (2 * number of VPEs in the system).
allOf: $ref: /schemas/types.yaml#definitions/uint32-array
- $ref: /schemas/types.yaml#definitions/uint32-array items:
- items: - minimum: 0
- minimum: 0 maximum: 254
maximum: 254 - minimum: 2
- minimum: 2 maximum: 254
maximum: 254
timer: timer:
type: object type: object
......
...@@ -38,39 +38,36 @@ properties: ...@@ -38,39 +38,36 @@ properties:
dongwoon,aac-mode: dongwoon,aac-mode:
description: description:
Indication of AAC mode select. Indication of AAC mode select.
allOf: $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32" enum:
- enum: - 1 # AAC2 mode(operation time# 0.48 x Tvib)
- 1 # AAC2 mode(operation time# 0.48 x Tvib) - 2 # AAC3 mode(operation time# 0.70 x Tvib)
- 2 # AAC3 mode(operation time# 0.70 x Tvib) - 3 # AAC4 mode(operation time# 0.75 x Tvib)
- 3 # AAC4 mode(operation time# 0.75 x Tvib) - 5 # AAC8 mode(operation time# 1.13 x Tvib)
- 5 # AAC8 mode(operation time# 1.13 x Tvib) default: 2
default: 2
dongwoon,aac-timing: dongwoon,aac-timing:
description: description:
Number of AAC Timing count that controlled by one 6-bit period of Number of AAC Timing count that controlled by one 6-bit period of
vibration register AACT[5:0], the unit of which is 100 us. vibration register AACT[5:0], the unit of which is 100 us.
allOf: $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32" default: 0x20
- default: 0x20 minimum: 0x00
minimum: 0x00 maximum: 0x3f
maximum: 0x3f
dongwoon,clock-presc: dongwoon,clock-presc:
description: description:
Indication of VCM internal clock dividing rate select, as one multiple Indication of VCM internal clock dividing rate select, as one multiple
factor to calculate VCM ring periodic time Tvib. factor to calculate VCM ring periodic time Tvib.
allOf: $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32" enum:
- enum: - 0 # Dividing Rate - 2
- 0 # Dividing Rate - 2 - 1 # Dividing Rate - 1
- 1 # Dividing Rate - 1 - 2 # Dividing Rate - 1/2
- 2 # Dividing Rate - 1/2 - 3 # Dividing Rate - 1/4
- 3 # Dividing Rate - 1/4 - 4 # Dividing Rate - 8
- 4 # Dividing Rate - 8 - 5 # Dividing Rate - 4
- 5 # Dividing Rate - 4 default: 1
default: 1
required: required:
- compatible - compatible
......
...@@ -31,8 +31,7 @@ properties: ...@@ -31,8 +31,7 @@ properties:
ti,syscon-pcie-ctrl: ti,syscon-pcie-ctrl:
description: Phandle to the SYSCON entry required for configuring PCIe mode description: Phandle to the SYSCON entry required for configuring PCIe mode
and link speed. and link speed.
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
power-domains: power-domains:
maxItems: 1 maxItems: 1
......
...@@ -31,8 +31,7 @@ properties: ...@@ -31,8 +31,7 @@ properties:
ti,syscon-pcie-ctrl: ti,syscon-pcie-ctrl:
description: Phandle to the SYSCON entry required for configuring PCIe mode description: Phandle to the SYSCON entry required for configuring PCIe mode
and link speed. and link speed.
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
power-domains: power-domains:
maxItems: 1 maxItems: 1
......
...@@ -18,16 +18,14 @@ properties: ...@@ -18,16 +18,14 @@ properties:
description: I2C address of the device. description: I2C address of the device.
maxim,temperature_calib: maxim,temperature_calib:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
description: The calculated temperature data was measured while doing the calibration. description: The calculated temperature data was measured while doing the calibration.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0 minimum: 0
maximum: 65535 maximum: 65535
maxim,r0_calib: maxim,r0_calib:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
description: This is r0 calibration data which was measured in factory mode. description: This is r0 calibration data which was measured in factory mode.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1 minimum: 1
maximum: 8388607 maximum: 8388607
......
...@@ -48,8 +48,7 @@ properties: ...@@ -48,8 +48,7 @@ properties:
sound-name-prefix: sound-name-prefix:
pattern: "^DSPK[1-9]$" pattern: "^DSPK[1-9]$"
allOf: $ref: /schemas/types.yaml#/definitions/string
- $ref: /schemas/types.yaml#/definitions/string
description: description:
Used as prefix for sink/source names of the component. Must be a Used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component. unique string among multiple instances of the same component.
......
...@@ -49,8 +49,7 @@ properties: ...@@ -49,8 +49,7 @@ properties:
sound-name-prefix: sound-name-prefix:
pattern: "^DMIC[1-9]$" pattern: "^DMIC[1-9]$"
allOf: $ref: /schemas/types.yaml#/definitions/string
- $ref: /schemas/types.yaml#/definitions/string
description: description:
used as prefix for sink/source names of the component. Must be a used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component. unique string among multiple instances of the same component.
......
...@@ -67,8 +67,7 @@ properties: ...@@ -67,8 +67,7 @@ properties:
sound-name-prefix: sound-name-prefix:
pattern: "^I2S[1-9]$" pattern: "^I2S[1-9]$"
allOf: $ref: /schemas/types.yaml#/definitions/string
- $ref: /schemas/types.yaml#/definitions/string
description: description:
Used as prefix for sink/source names of the component. Must be a Used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component. unique string among multiple instances of the same component.
......
...@@ -37,13 +37,11 @@ properties: ...@@ -37,13 +37,11 @@ properties:
ti,cpb-mcasp: ti,cpb-mcasp:
description: phandle to McASP used on CPB description: phandle to McASP used on CPB
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
ti,cpb-codec: ti,cpb-codec:
description: phandle to the pcm3168a codec used on the CPB description: phandle to the pcm3168a codec used on the CPB
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
clocks: clocks:
items: items:
......
...@@ -50,28 +50,23 @@ properties: ...@@ -50,28 +50,23 @@ properties:
ti,cpb-mcasp: ti,cpb-mcasp:
description: phandle to McASP used on CPB description: phandle to McASP used on CPB
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
ti,cpb-codec: ti,cpb-codec:
description: phandle to the pcm3168a codec used on the CPB description: phandle to the pcm3168a codec used on the CPB
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
ti,ivi-mcasp: ti,ivi-mcasp:
description: phandle to McASP used on IVI description: phandle to McASP used on IVI
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
ti,ivi-codec-a: ti,ivi-codec-a:
description: phandle to the pcm3168a-A codec on the expansion board description: phandle to the pcm3168a-A codec on the expansion board
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
ti,ivi-codec-b: ti,ivi-codec-b:
description: phandle to the pcm3168a-B codec on the expansion board description: phandle to the pcm3168a-B codec on the expansion board
allOf: $ref: /schemas/types.yaml#/definitions/phandle
- $ref: /schemas/types.yaml#/definitions/phandle
clocks: clocks:
items: items:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment