devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-binding: convert spdif-receiver.txt to dt-schema
@ 2024-06-05 16:20 Neil Armstrong
  2024-06-05 22:58 ` Rob Herring (Arm)
  2024-06-05 23:10 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Neil Armstrong @ 2024-06-05 16:20 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-sound, devicetree, linux-kernel, Neil Armstrong

Convert text bindings to dt-schema format for the Dummy SPDIF receiver

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 .../devicetree/bindings/sound/linux,spdif-dir.yaml | 37 ++++++++++++++++++++++
 .../devicetree/bindings/sound/spdif-receiver.txt   | 10 ------
 2 files changed, 37 insertions(+), 10 deletions(-)

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..ec8990c236f7
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0
+%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:
+  - Mark Brown <broonie@kernel.org>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: linux,spdif-dir
+
+  "#sound-dai-cells":
+    const: 0
+
+  sound-name-prefix: true
+
+required:
+  - "#sound-dai-cells"
+  - compatible
+
+addirionalProperties: false
+
+examples:
+  - |
+    spdif-in {
+        #sound-dai-cells = <0>;
+        compatible = "linux,spdif-dir";
+    };
+
+...
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";
-	};

---
base-commit: c3f38fa61af77b49866b006939479069cd451173
change-id: 20240605-topic-amlogic-upstream-bindings-convert-spdif-receiver-c8d2fdb688cb

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: dt-binding: convert spdif-receiver.txt to dt-schema
  2024-06-05 16:20 [PATCH] ASoC: dt-binding: convert spdif-receiver.txt to dt-schema Neil Armstrong
@ 2024-06-05 22:58 ` Rob Herring (Arm)
  2024-06-05 23:10 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2024-06-05 22:58 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: linux-kernel, Liam Girdwood, Conor Dooley, Mark Brown,
	Krzysztof Kozlowski, linux-sound, devicetree


On Wed, 05 Jun 2024 18:20:50 +0200, Neil Armstrong wrote:
> Convert text bindings to dt-schema format for the Dummy SPDIF receiver
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../devicetree/bindings/sound/linux,spdif-dir.yaml | 37 ++++++++++++++++++++++
>  .../devicetree/bindings/sound/spdif-receiver.txt   | 10 ------
>  2 files changed, 37 insertions(+), 10 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml: 'addirionalProperties' is not one of ['$id', '$schema', 'title', 'description', 'examples', 'required', 'allOf', 'anyOf', 'oneOf', 'definitions', '$defs', 'additionalProperties', 'dependencies', 'dependentRequired', 'dependentSchemas', 'patternProperties', 'properties', 'not', 'if', 'then', 'else', 'unevaluatedProperties', 'deprecated', 'maintainers', 'select', '$ref']
	from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml: 'oneOf' conditional failed, one must be fixed:
	'unevaluatedProperties' is a required property
	'additionalProperties' is a required property
	hint: Either unevaluatedProperties or additionalProperties must be present
	from schema $id: http://devicetree.org/meta-schemas/core.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240605-topic-amlogic-upstream-bindings-convert-spdif-receiver-v1-1-262465adbac2@linaro.org

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: dt-binding: convert spdif-receiver.txt to dt-schema
  2024-06-05 16:20 [PATCH] ASoC: dt-binding: convert spdif-receiver.txt to dt-schema Neil Armstrong
  2024-06-05 22:58 ` Rob Herring (Arm)
@ 2024-06-05 23:10 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2024-06-05 23:10 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley,
	linux-sound, devicetree, linux-kernel

On Wed, Jun 05, 2024 at 06:20:50PM +0200, Neil Armstrong wrote:
> Convert text bindings to dt-schema format for the Dummy SPDIF receiver

Couldn't this be shared with the transmitter. The only diff is the 
compatible.

> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../devicetree/bindings/sound/linux,spdif-dir.yaml | 37 ++++++++++++++++++++++
>  .../devicetree/bindings/sound/spdif-receiver.txt   | 10 ------
>  2 files changed, 37 insertions(+), 10 deletions(-)
> 
> 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..ec8990c236f7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/linux,spdif-dir.yaml
> @@ -0,0 +1,37 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%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:
> +  - Mark Brown <broonie@kernel.org>
> +
> +allOf:
> +  - $ref: dai-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: linux,spdif-dir
> +
> +  "#sound-dai-cells":
> +    const: 0
> +
> +  sound-name-prefix: true
> +
> +required:
> +  - "#sound-dai-cells"
> +  - compatible
> +
> +addirionalProperties: false
> +
> +examples:
> +  - |
> +    spdif-in {
> +        #sound-dai-cells = <0>;
> +        compatible = "linux,spdif-dir";
> +    };
> +
> +...
> 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";
> -	};
> 
> ---
> base-commit: c3f38fa61af77b49866b006939479069cd451173
> change-id: 20240605-topic-amlogic-upstream-bindings-convert-spdif-receiver-c8d2fdb688cb
> 
> Best regards,
> -- 
> Neil Armstrong <neil.armstrong@linaro.org>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-05 23:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 16:20 [PATCH] ASoC: dt-binding: convert spdif-receiver.txt to dt-schema Neil Armstrong
2024-06-05 22:58 ` Rob Herring (Arm)
2024-06-05 23:10 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).