Re: [PATCH v2] ASoC: dt-bindings: Convert mxs-saif.txt to fsl,saif.yaml (imx28 saif)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 28, 2024 at 11:11:39AM +0200, Lukasz Majewski wrote:
> The 'fsl,imx28-saif' compatible has already the mxs-saif.txt description.
> This patch converts (and removes it) this file to fsl,saif.yaml (to follow
> current fsl convention).
> 
> Changes for the mxs-saif.txt:
> - Adds 'clocks' and '#sound-dai-cells' properties
> - Provide device description
> 
> Signed-off-by: Lukasz Majewski <lukma@xxxxxxx>
> 
> ---
> Changes for v2:
> - Remove mxs-saif.txt
> - Add description with information about extensions required for this
>   device's current DTS description
> ---
>  .../devicetree/bindings/sound/fsl,saif.yaml   | 78 +++++++++++++++++++
>  .../devicetree/bindings/sound/mxs-saif.txt    | 41 ----------
>  2 files changed, 78 insertions(+), 41 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/fsl,saif.yaml
>  delete mode 100644 Documentation/devicetree/bindings/sound/mxs-saif.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,saif.yaml b/Documentation/devicetree/bindings/sound/fsl,saif.yaml
> new file mode 100644
> index 000000000000..cc78a95e0391
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/fsl,saif.yaml

Filename matching the compatible please.

> @@ -0,0 +1,78 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/fsl,saif.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale MXS Serial Audio Interface (SAIF)
> +
> +maintainers:
> +  - Lukasz Majewski <lukma@xxxxxxx>
> +
> +allOf:
> +  - $ref: dai-common.yaml#
> +
> +description:
> +  The SAIF is based on I2S module that is used to communicate with audio codecs,
> +  but only with half-duplex manner (i.e. it can either transmit or receive PCM
> +  audio).
> +
> +properties:
> +  compatible:
> +    const: fsl,imx28-saif
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#sound-dai-cells":
> +    const: 0
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  dmas:
> +    maxItems: 1
> +
> +  dma-names:
> +    const: rx-tx
> +
> +  clocks:
> +    maxItems: 1
> +
> +  fsl,saif-master:
> +    description: Indicate that saif is a slave and its phandle points to master
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#sound-dai-cells"
> +  - interrupts
> +  - dmas
> +  - dma-names
> +  - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    saif0: saif@80042000 {

The label here isn't needed, as you've got no references to it that use
them, because the leading - before examples make them independent and
thus the &saif0 in the second one is just a made up phandle when the
example is compiled by the test infrastructure (like the &clks is).
Either drop the - | from the second one, or drop the first example
entirely.


> +        compatible = "fsl,imx28-saif";
> +        reg = <0x80042000 2000>;
> +        #sound-dai-cells = <0>;
> +        interrupts = <59>;
> +        dmas = <&dma_apbx 4>;
> +        dma-names = "rx-tx";
> +        clocks = <&clks 53>;
> +    };
> +  - |
> +    saif1: saif@80046000 {

While you're at it, this saif1 label isn't used.

Thanks,
Conor.

> +        compatible = "fsl,imx28-saif";
> +        reg = <0x80046000 2000>;
> +        #sound-dai-cells = <0>;
> +        interrupts = <58>;
> +        dmas = <&dma_apbx 5>;
> +        dma-names = "rx-tx";
> +        clocks = <&clks 53>;
> +        fsl,saif-master = <&saif0>;
> +    };

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux