diff mbox series

[1/6] ASoC: dt-bindings: samsung, aries-wm8994: require sound-dai property

Message ID 20220124170336.164320-1-krzysztof.kozlowski@canonical.com
State Superseded
Headers show
Series [1/6] ASoC: dt-bindings: samsung, aries-wm8994: require sound-dai property | expand

Commit Message

Krzysztof Kozlowski Jan. 24, 2022, 5:03 p.m. UTC
The cpu and codec nodes must provide sound-dai property.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 .../devicetree/bindings/sound/samsung,aries-wm8994.yaml       | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rob Herring Jan. 25, 2022, 12:24 a.m. UTC | #1
On Mon, Jan 24, 2022 at 06:03:35PM +0100, Krzysztof Kozlowski wrote:
> Convert the audio complex on Google Snow boards with Samsung Exynos SoC
> to DT schema format.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> 
> ---
> 
> TODO: The DTS do not pass cleanly. cpu/sound-dai should be fixed.
> ---
>  .../bindings/sound/samsung,snow.yaml          | 78 +++++++++++++++++++
>  .../devicetree/bindings/sound/snow.txt        | 31 --------
>  2 files changed, 78 insertions(+), 31 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/samsung,snow.yaml
>  delete mode 100644 Documentation/devicetree/bindings/sound/snow.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/samsung,snow.yaml b/Documentation/devicetree/bindings/sound/samsung,snow.yaml
> new file mode 100644
> index 000000000000..df969b384839
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/samsung,snow.yaml
> @@ -0,0 +1,78 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/samsung,snow.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Google Snow audio complex with MAX9809x codec
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> +  - Sylwester Nawrocki <s.nawrocki@samsung.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - google,snow-audio-max98090
> +      - google,snow-audio-max98091
> +      - google,snow-audio-max98095
> +
> +  codec:
> +    type: object
> +    properties:
> +      sound-dai:
> +        description: List of phandles to the CODEC and HDMI IP nodes.
> +        $ref: /schemas/types.yaml#/definitions/phandle-array
> +        items:
> +          - description: Phandle to the MAX98090, MAX98091 or MAX98095 CODEC.
> +          - description: Phandle to the HDMI IP block node.

Thinking about this and the issue you raised some more, we should make 
sure there's a common definition for sound-dai. And then here, it should 
just be the number of entries ('maxItems: 1').

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml
index eb487ed3ca3b..d5cc221787cf 100644
--- a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml
+++ b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml
@@ -33,6 +33,8 @@  properties:
         description: |
           phandles to the I2S controller and bluetooth codec,
           in that order
+    required:
+      - sound-dai
 
   codec:
     type: object
@@ -40,6 +42,8 @@  properties:
       sound-dai:
         $ref: /schemas/types.yaml#/definitions/phandle-array
         description: phandle to the WM8994 CODEC
+    required:
+      - sound-dai
 
   samsung,audio-routing:
     $ref: /schemas/types.yaml#/definitions/non-unique-string-array