devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: sound: Convert max98088 to dtschema
@ 2024-06-12 14:59 Abdulrasaq Lawani
  2024-06-12 15:04 ` Krzysztof Kozlowski
  2024-06-12 16:26 ` Rob Herring (Arm)
  0 siblings, 2 replies; 3+ messages in thread
From: Abdulrasaq Lawani @ 2024-06-12 14:59 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, lgirdwood, broonie
  Cc: Abdulrasaq Lawani, skhan, javier.carrasco.cruz, linux-sound,
	devicetree, linux-kernel

Convert the max98088 audio codec txt bindings to DT schema.

Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
---
Validated with dtschema and tested against samsung/exynos5800-peach-pi.dts.

 .../bindings/sound/maxim,max98088.txt         | 23 ---------
 .../bindings/sound/maxim,max98088.yaml        | 47 +++++++++++++++++++
 2 files changed, 47 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/maxim,max98088.txt
 create mode 100644 Documentation/devicetree/bindings/sound/maxim,max98088.yaml

diff --git a/Documentation/devicetree/bindings/sound/maxim,max98088.txt b/Documentation/devicetree/bindings/sound/maxim,max98088.txt
deleted file mode 100644
index da764d913319..000000000000
--- a/Documentation/devicetree/bindings/sound/maxim,max98088.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-MAX98088 audio CODEC
-
-This device supports I2C only.
-
-Required properties:
-
-- compatible: "maxim,max98088" or "maxim,max98089".
-- reg: The I2C address of the device.
-
-Optional properties:
-
-- clocks: the clock provider of MCLK, see ../clock/clock-bindings.txt section
-  "consumer" for more information.
-- clock-names: must be set to "mclk"
-
-Example:
-
-max98089: codec@10 {
-	compatible = "maxim,max98089";
-	reg = <0x10>;
-	clocks = <&clks IMX6QDL_CLK_CKO2>;
-	clock-names = "mclk";
-};
diff --git a/Documentation/devicetree/bindings/sound/maxim,max98088.yaml b/Documentation/devicetree/bindings/sound/maxim,max98088.yaml
new file mode 100644
index 000000000000..8800075f7f97
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/maxim,max98088.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/maxim,max98088.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MAX98088 audio CODEC
+
+maintainers:
+  - Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - maxim,max98088
+      - maxim,max98091
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: master clock
+
+  clock-names:
+    items:
+      - const: mclk
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        audio-codec@10 {
+            compatible = "maxim,max98089";
+            reg = <0x10>;
+            clocks = <&clks 0>;
+            clock-names = "mclk";
+        };
+    };
-- 
2.43.0


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

* Re: [PATCH v2] dt-bindings: sound: Convert max98088 to dtschema
  2024-06-12 14:59 [PATCH v2] dt-bindings: sound: Convert max98088 to dtschema Abdulrasaq Lawani
@ 2024-06-12 15:04 ` Krzysztof Kozlowski
  2024-06-12 16:26 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-12 15:04 UTC (permalink / raw)
  To: Abdulrasaq Lawani, robh, krzk+dt, conor+dt, lgirdwood, broonie
  Cc: skhan, javier.carrasco.cruz, linux-sound, devicetree,
	linux-kernel

On 12/06/2024 16:59, Abdulrasaq Lawani wrote:
> Convert the max98088 audio codec txt bindings to DT schema.
> 
> Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
> ---
> Validated with dtschema and tested against samsung/exynos5800-peach-pi.dts.

What?

This is not a codec for this board. You are mixing now
Documentation/devicetree/bindings/sound/maxim,max98090.yaml

Whatever you validated against Peach Pi DTS is wrong or not enough. You
need to validate it against DTS using this binding.


> +
> +maintainers:
> +  - Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - maxim,max98088
> +      - maxim,max98091

91? You meant 89...

Best regards,
Krzysztof


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

* Re: [PATCH v2] dt-bindings: sound: Convert max98088 to dtschema
  2024-06-12 14:59 [PATCH v2] dt-bindings: sound: Convert max98088 to dtschema Abdulrasaq Lawani
  2024-06-12 15:04 ` Krzysztof Kozlowski
@ 2024-06-12 16:26 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2024-06-12 16:26 UTC (permalink / raw)
  To: Abdulrasaq Lawani
  Cc: devicetree, linux-sound, broonie, krzk+dt, skhan,
	javier.carrasco.cruz, lgirdwood, linux-kernel, conor+dt


On Wed, 12 Jun 2024 10:59:01 -0400, Abdulrasaq Lawani wrote:
> Convert the max98088 audio codec txt bindings to DT schema.
> 
> Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
> ---
> Validated with dtschema and tested against samsung/exynos5800-peach-pi.dts.
> 
>  .../bindings/sound/maxim,max98088.txt         | 23 ---------
>  .../bindings/sound/maxim,max98088.yaml        | 47 +++++++++++++++++++
>  2 files changed, 47 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/maxim,max98088.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/maxim,max98088.yaml
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/sound/maxim,max98088.example.dtb: /example-0/i2c/audio-codec@10: failed to match any schema with compatible: ['maxim,max98089']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240612145903.497758-1-abdulrasaqolawani@gmail.com

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

end of thread, other threads:[~2024-06-12 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 14:59 [PATCH v2] dt-bindings: sound: Convert max98088 to dtschema Abdulrasaq Lawani
2024-06-12 15:04 ` Krzysztof Kozlowski
2024-06-12 16:26 ` Rob Herring (Arm)

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).