2024-06-05 11:23:43

by Animesh Agarwal

[permalink] [raw]
Subject: [PATCH] ASoC: dt-bindings: linux,spdif-dir: Convert to dtschema

Convert the dummy SPDIF receiver bindings to DT schema. Make bindings
complete by adding property "#sound-dai-cells"

Signed-off-by: Animesh Agarwal <[email protected]>
Cc: Daniel Baluta <[email protected]>
---
.../bindings/sound/linux,spdif-dir.yaml | 34 +++++++++++++++++++
.../bindings/sound/spdif-receiver.txt | 10 ------
2 files changed, 34 insertions(+), 10 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/spdif-receiver.txt

diff --git a/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
new file mode 100644
index 000000000000..61767873200f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/linux,spdif-dir.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dummy SPDIF receiver
+
+maintainers:
+ - Liam Girdwood <[email protected]>
+ - Mark Brown <[email protected]>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: linux,spdif-dir
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - "#sound-dai-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spdif-in {
+ compatible = "linux,spdif-dir";
+ #sound-dai-cells = <0>;
+ };
diff --git a/Documentation/devicetree/bindings/sound/spdif-receiver.txt b/Documentation/devicetree/bindings/sound/spdif-receiver.txt
deleted file mode 100644
index 80f807bf8a1d..000000000000
--- a/Documentation/devicetree/bindings/sound/spdif-receiver.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Device-Tree bindings for dummy spdif receiver
-
-Required properties:
- - compatible: should be "linux,spdif-dir".
-
-Example node:
-
- codec: spdif-receiver {
- compatible = "linux,spdif-dir";
- };
--
2.45.1



2024-06-06 00:55:01

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH] ASoC: dt-bindings: linux,spdif-dir: Convert to dtschema

On Wed, Jun 05, 2024 at 04:52:55PM +0530, Animesh Agarwal wrote:
> Convert the dummy SPDIF receiver bindings to DT schema. Make bindings
> complete by adding property "#sound-dai-cells"

2 conversions of the same thing in one day:

https://lore.kernel.org/all/20240605-topic-amlogic-upstream-bindings-convert-spdif-receiver-v1-1-262465adbac2@linaro.org/

As I said there, I would just add the compatible to
linux,spdif-dit.yaml. But this is fine too.

>
> Signed-off-by: Animesh Agarwal <[email protected]>
> Cc: Daniel Baluta <[email protected]>
> ---
> .../bindings/sound/linux,spdif-dir.yaml | 34 +++++++++++++++++++
> .../bindings/sound/spdif-receiver.txt | 10 ------
> 2 files changed, 34 insertions(+), 10 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/spdif-receiver.txt
>
> diff --git a/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> new file mode 100644
> index 000000000000..61767873200f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> @@ -0,0 +1,34 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/linux,spdif-dir.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Dummy SPDIF receiver
> +
> +maintainers:
> + - Liam Girdwood <[email protected]>
> + - Mark Brown <[email protected]>
> +
> +allOf:
> + - $ref: dai-common.yaml#
> +
> +properties:
> + compatible:
> + const: linux,spdif-dir
> +
> + "#sound-dai-cells":
> + const: 0

It wasn't in the txt binding, but users also use 'sound-name-prefix'
property, so that should be added here.

Rob

2024-06-06 02:19:51

by Animesh Agarwal

[permalink] [raw]
Subject: Re: [PATCH] ASoC: dt-bindings: linux,spdif-dir: Convert to dtschema

On Thu, Jun 6, 2024 at 6:23 AM Rob Herring <[email protected]> wrote:
>
> On Wed, Jun 05, 2024 at 04:52:55PM +0530, Animesh Agarwal wrote:
> > Convert the dummy SPDIF receiver bindings to DT schema. Make bindings
> > complete by adding property "#sound-dai-cells"
>
> 2 conversions of the same thing in one day:
>
> https://lore.kernel.org/all/20240605-topic-amlogic-upstream-bindings-convert-spdif-receiver-v1-1-262465adbac2@linaro.org/
>
> As I said there, I would just add the compatible to
> linux,spdif-dit.yaml. But this is fine too.
>
> >
> > Signed-off-by: Animesh Agarwal <[email protected]>
> > Cc: Daniel Baluta <[email protected]>
> > ---
> > .../bindings/sound/linux,spdif-dir.yaml | 34 +++++++++++++++++++
> > .../bindings/sound/spdif-receiver.txt | 10 ------
> > 2 files changed, 34 insertions(+), 10 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> > delete mode 100644 Documentation/devicetree/bindings/sound/spdif-receiver.txt
> >
> > diff --git a/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> > new file mode 100644
> > index 000000000000..61767873200f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> > @@ -0,0 +1,34 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/linux,spdif-dir.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Dummy SPDIF receiver
> > +
> > +maintainers:
> > + - Liam Girdwood <[email protected]>
> > + - Mark Brown <[email protected]>
> > +
> > +allOf:
> > + - $ref: dai-common.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: linux,spdif-dir
> > +
> > + "#sound-dai-cells":
> > + const: 0
>
> It wasn't in the txt binding, but users also use 'sound-name-prefix'
> property, so that should be added here.
linux,spdif-dir.yaml

If this is the case, I'll add the linux,spdif-dir compatible in
linux,spdif-dit.yaml instead of creating a new file in v2 of this
patch.

Regards,
Animesh Agarwal

2024-06-06 07:58:18

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] ASoC: dt-bindings: linux,spdif-dir: Convert to dtschema

On 06/06/2024 04:19, Animesh Agarwal wrote:
> On Thu, Jun 6, 2024 at 6:23 AM Rob Herring <[email protected]> wrote:
>>
>> On Wed, Jun 05, 2024 at 04:52:55PM +0530, Animesh Agarwal wrote:
>>> Convert the dummy SPDIF receiver bindings to DT schema. Make bindings
>>> complete by adding property "#sound-dai-cells"
>>
>> 2 conversions of the same thing in one day:
>>
>> https://lore.kernel.org/all/20240605-topic-amlogic-upstream-bindings-convert-spdif-receiver-v1-1-262465adbac2@linaro.org/
>>
>> As I said there, I would just add the compatible to
>> linux,spdif-dit.yaml. But this is fine too.
>>
>>>
>>> Signed-off-by: Animesh Agarwal <[email protected]>
>>> Cc: Daniel Baluta <[email protected]>
>>> ---
>>> .../bindings/sound/linux,spdif-dir.yaml | 34 +++++++++++++++++++
>>> .../bindings/sound/spdif-receiver.txt | 10 ------
>>> 2 files changed, 34 insertions(+), 10 deletions(-)
>>> create mode 100644 Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
>>> delete mode 100644 Documentation/devicetree/bindings/sound/spdif-receiver.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
>>> new file mode 100644
>>> index 000000000000..61767873200f
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
>>> @@ -0,0 +1,34 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/sound/linux,spdif-dir.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Dummy SPDIF receiver
>>> +
>>> +maintainers:
>>> + - Liam Girdwood <[email protected]>
>>> + - Mark Brown <[email protected]>
>>> +
>>> +allOf:
>>> + - $ref: dai-common.yaml#
>>> +
>>> +properties:
>>> + compatible:
>>> + const: linux,spdif-dir
>>> +
>>> + "#sound-dai-cells":
>>> + const: 0
>>
>> It wasn't in the txt binding, but users also use 'sound-name-prefix'
>> property, so that should be added here.
> linux,spdif-dir.yaml
>
> If this is the case, I'll add the linux,spdif-dir compatible in
> linux,spdif-dit.yaml instead of creating a new file in v2 of this
> patch.

OK but perhaps rename into dummy-spdif.yaml, no ?


Thanks,
Neil

>
> Regards,
> Animesh Agarwal


2024-06-07 06:00:54

by Animesh Agarwal

[permalink] [raw]
Subject: Re: [PATCH] ASoC: dt-bindings: linux,spdif-dir: Convert to dtschema

On Thu, Jun 6, 2024 at 1:27 PM Neil Armstrong <[email protected]> wrote:
> OK but perhaps rename into dummy-spdif.yaml, no ?
>
>
> Thanks,
> Neil

I already sent a patch renaming it to linux,spdif.yaml. Is that fine?