OSDN Git Service

ASoC: dt-bindings: Convert SPDIF Transmitter binding to a schema
authorMaxime Ripard <maxime@cerno.tech>
Wed, 1 Sep 2021 09:18:03 +0000 (11:18 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 13 Sep 2021 00:48:11 +0000 (01:48 +0100)
The SPDIF Transmitter binding is used by Linux with a matching Device
Tree binding.

Now that we have the DT validation in place, let's convert the device
tree bindings for that driver over to a YAML schema.

Cc: alsa-devel@alsa-project.org
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210901091852.479202-4-maxime@cerno.tech
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/linux,spdif-dit.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/sound/spdif-transmitter.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/sound/linux,spdif-dit.yaml b/Documentation/devicetree/bindings/sound/linux,spdif-dit.yaml
new file mode 100644 (file)
index 0000000..c6b070e
--- /dev/null
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/linux,spdif-dit.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dummy SPDIF Transmitter Device Tree Bindings
+
+maintainers:
+  - Mark Brown <broonie@kernel.org>
+
+properties:
+  compatible:
+    const: linux,spdif-dit
+
+  "#sound-dai-cells":
+    const: 0
+
+required:
+  - "#sound-dai-cells"
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    spdif-out {
+        #sound-dai-cells = <0>;
+        compatible = "linux,spdif-dit";
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/sound/spdif-transmitter.txt b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
deleted file mode 100644 (file)
index 55a8584..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Device-Tree bindings for dummy spdif transmitter
-
-Required properties:
-       - compatible: should be "linux,spdif-dit".
-
-Example node:
-
-       codec: spdif-transmitter {
-               compatible = "linux,spdif-dit";
-       };