Commit 086e9074 authored by Rob Herring's avatar Rob Herring
Browse files

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: default avatarRob Herring <robh@kernel.org>
parent 2dca74a4
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -85,9 +85,8 @@ properties:
      CPU power good signal from external PMIC to PMC is enabled.

  nvidia,suspend-mode:
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [0, 1, 2]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2]
    description:
      The suspend mode that the platform should use.
      Mode 0 is for LP0, CPU + Core voltage off and DRAM in self-refresh
+9 −12
Original line number Diff line number Diff line
@@ -40,27 +40,24 @@ properties:

  calxeda,led-order:
    description: Maps port numbers to offsets within the SGPIO bitstream.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32-array
      - minItems: 1
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  calxeda,port-phys:
    description: |
      phandle-combophy and lane assignment, which maps each SATA port to a
      combophy and a lane within that combophy
    allOf:
      - $ref: /schemas/types.yaml#/definitions/phandle-array
      - minItems: 1
    $ref: /schemas/types.yaml#/definitions/phandle-array
    minItems: 1
    maxItems: 8

  calxeda,tx-atten:
    description: |
      Contains TX attenuation override codes, one per port.
      The upper 24 bits of each entry are always 0 and thus ignored.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32-array
      - minItems: 1
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  calxeda,sgpio-gpio:
+3 −4
Original line number Diff line number Diff line
@@ -63,10 +63,9 @@ patternProperties:

      snps,nr-gpios:
        description: The number of GPIO pins exported by the port.
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 32
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint32
          - minimum: 1
        minimum: 1
        maximum: 32

      interrupts:
+1 −2
Original line number Diff line number Diff line
@@ -67,8 +67,7 @@ properties:
      1 - direct_sync
      2 - scaled_sync
      3 - pulse_sync
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 3

+2 −3
Original line number Diff line number Diff line
@@ -25,9 +25,8 @@ properties:

  amstaos,cover-comp-gain:
    description: Multiplier for gain compensation
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [1, 16]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 16]

required:
  - compatible
Loading