Commit 97709d36 authored by Rob Herring's avatar Rob Herring
Browse files

ASoC: dt-bindings: Centralize the 'sound-dai' definition



'sound-dai' is a common property, but has duplicate type definitions.
Create a new common definition to define the type and then update all
the other occurrences to just define how many entries there are just
like other phandle+arg properties.

The constraints on the number of entries is based on the examples and
could be wrong.

Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220126231427.1638089-1-robh@kernel.org
parent d7f17b66
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ patternProperties:
          rate

      sound-dai:
        $ref: /schemas/types.yaml#/definitions/phandle-array
        maxItems: 1
        description: phandle of the CPU DAI

    patternProperties:
@@ -71,7 +71,7 @@ patternProperties:

        properties:
          sound-dai:
            $ref: /schemas/types.yaml#/definitions/phandle-array
            maxItems: 1
            description: phandle of the codec DAI

        required:
+4 −2
Original line number Diff line number Diff line
@@ -62,13 +62,15 @@ patternProperties:
        description: Holds subnode which indicates cpu dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            maxItems: 1

      codec:
        description: Holds subnode which indicates codec dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            maxItems: 1

    required:
      - link-name
+5 −2
Original line number Diff line number Diff line
@@ -59,13 +59,16 @@ patternProperties:
        description: Holds subnode which indicates cpu dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            maxItems: 1

      codec:
        description: Holds subnode which indicates codec dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            minItems: 1
            maxItems: 2

      fsl,mclk-equal-bclk:
        description: Indicates mclk can be equal to bclk, especially for sai interface
+7 −3
Original line number Diff line number Diff line
@@ -69,19 +69,23 @@ patternProperties:
        description: Holds subnode which indicates cpu dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            maxItems: 1

      platform:
        description: Holds subnode which indicates platform dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            maxItems: 1

      codec:
        description: Holds subnode which indicates codec dai.
        type: object
        properties:
          sound-dai: true
          sound-dai:
            minItems: 1
            maxItems: 4

    required:
      - link-name
+1 −4
Original line number Diff line number Diff line
@@ -27,9 +27,6 @@ properties:
      sound-dai:
        minItems: 2
        maxItems: 2
        items:
          maxItems: 1
        $ref: /schemas/types.yaml#/definitions/phandle-array
        description: |
          phandles to the I2S controller and bluetooth codec,
          in that order
@@ -38,7 +35,7 @@ properties:
    type: object
    properties:
      sound-dai:
        $ref: /schemas/types.yaml#/definitions/phandle-array
        maxItems: 1
        description: phandle to the WM8994 CODEC

  samsung,audio-routing:
Loading