linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: maxim,max98371: Convert to DT schema
@ 2023-03-31  2:05 André Morishita
  2023-03-31  9:47 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: André Morishita @ 2023-03-31  2:05 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	anish kumar, alsa-devel, devicetree, linux-kernel
  Cc: mairacanal, dri-devel, daniel.baluta, André Morishita

Convert the Maxim Integrated MAX98371 audio codec bindings to DT schema.

Signed-off-by: André Morishita <andremorishita@gmail.com>
---
 .../devicetree/bindings/sound/max98371.txt    | 17 --------
 .../bindings/sound/maxim,max98371.yaml        | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/max98371.txt
 create mode 100644 Documentation/devicetree/bindings/sound/maxim,max98371.yaml

diff --git a/Documentation/devicetree/bindings/sound/max98371.txt b/Documentation/devicetree/bindings/sound/max98371.txt
deleted file mode 100644
index 8b2b2704b574..000000000000
--- a/Documentation/devicetree/bindings/sound/max98371.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-max98371 codec
-
-This device supports I2C mode only.
-
-Required properties:
-
-- compatible : "maxim,max98371"
-- reg : The chip select number on the I2C bus
-
-Example:
-
-&i2c {
-	max98371: max98371@31 {
-		compatible = "maxim,max98371";
-		reg = <0x31>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/maxim,max98371.yaml b/Documentation/devicetree/bindings/sound/maxim,max98371.yaml
new file mode 100644
index 000000000000..df0262473399
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/maxim,max98371.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/maxim,max98371.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX98371 audio codec
+
+maintainers:
+  - anish kumar <yesanishhere@gmail.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: maxim,max98371
+
+  '#sound-dai-cells':
+    const: 0
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        max98371: max98371@31 {
+            compatible = "maxim,max98371";
+            reg = <0x31>;
+        };
+    };
-- 
2.40.0


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

* Re: [PATCH] dt-bindings: maxim,max98371: Convert to DT schema
  2023-03-31  2:05 [PATCH] dt-bindings: maxim,max98371: Convert to DT schema André Morishita
@ 2023-03-31  9:47 ` Krzysztof Kozlowski
  2023-03-31  9:47 ` Krzysztof Kozlowski
  2023-04-01  3:57 ` [PATCH v2] ASoC: dt-bindings: maxim,max98371: DT schema improvement André Morishita
  2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-31  9:47 UTC (permalink / raw)
  To: André Morishita, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, anish kumar, alsa-devel, devicetree,
	linux-kernel
  Cc: mairacanal, dri-devel, daniel.baluta

On 31/03/2023 04:05, André Morishita wrote:
> Convert the Maxim Integrated MAX98371 audio codec bindings to DT schema.
> 
> Signed-off-by: André Morishita <andremorishita@gmail.com>
> ---

Thank you for your patch. There is something to discuss/improve.

> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        max98371: max98371@31 {

Generic node names, so: codec

And drop label (max98371:)

> +            compatible = "maxim,max98371";
> +            reg = <0x31>;

#sound-dai-cells = <0>;

> +        };
> +    };

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: maxim,max98371: Convert to DT schema
  2023-03-31  2:05 [PATCH] dt-bindings: maxim,max98371: Convert to DT schema André Morishita
  2023-03-31  9:47 ` Krzysztof Kozlowski
@ 2023-03-31  9:47 ` Krzysztof Kozlowski
  2023-04-01  3:57 ` [PATCH v2] ASoC: dt-bindings: maxim,max98371: DT schema improvement André Morishita
  2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-31  9:47 UTC (permalink / raw)
  To: André Morishita, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, anish kumar, alsa-devel, devicetree,
	linux-kernel
  Cc: mairacanal, dri-devel, daniel.baluta

On 31/03/2023 04:05, André Morishita wrote:
> Convert the Maxim Integrated MAX98371 audio codec bindings to DT schema.
> 
> Signed-off-by: André Morishita <andremorishita@gmail.com>

Ahh, and missing ASoC subject prefix.

(which you can get for example with `git log --oneline --
DIRECTORY_OR_FILE` on the directory your patch is touching).



Best regards,
Krzysztof


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

* [PATCH v2] ASoC: dt-bindings: maxim,max98371: DT schema improvement
  2023-03-31  2:05 [PATCH] dt-bindings: maxim,max98371: Convert to DT schema André Morishita
  2023-03-31  9:47 ` Krzysztof Kozlowski
  2023-03-31  9:47 ` Krzysztof Kozlowski
@ 2023-04-01  3:57 ` André Morishita
  2023-04-01  9:45   ` Krzysztof Kozlowski
  2 siblings, 1 reply; 5+ messages in thread
From: André Morishita @ 2023-04-01  3:57 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	anish kumar, alsa-devel, devicetree, linux-kernel
  Cc: mairacanal, dri-devel, daniel.baluta, André Morishita

Improve Maxim Integrated MAX98371 audio codec bindings DT schema conversion

Signed-off-by: André Morishita <andremorishita@gmail.com>
---
Changes in v2
- Generic node names - codec (Krzysztof)
- Drop label max98371 (Krzysztof)
- Add sound-dai-cells in example (Krzysztof)

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

diff --git a/Documentation/devicetree/bindings/sound/max98371.txt b/Documentation/devicetree/bindings/sound/max98371.txt
deleted file mode 100644
index 8b2b2704b574..000000000000
--- a/Documentation/devicetree/bindings/sound/max98371.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-max98371 codec
-
-This device supports I2C mode only.
-
-Required properties:
-
-- compatible : "maxim,max98371"
-- reg : The chip select number on the I2C bus
-
-Example:
-
-&i2c {
-	max98371: max98371@31 {
-		compatible = "maxim,max98371";
-		reg = <0x31>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/maxim,max98371.yaml b/Documentation/devicetree/bindings/sound/maxim,max98371.yaml
new file mode 100644
index 000000000000..14fba34ef81a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/maxim,max98371.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/maxim,max98371.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX98371 audio codec
+
+maintainers:
+  - anish kumar <yesanishhere@gmail.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: maxim,max98371
+
+  '#sound-dai-cells':
+    const: 0
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        codec@31 {
+            compatible = "maxim,max98371";
+            reg = <0x31>;
+            #sound-dai-cells = <0>;
+        };
+    };
-- 
2.40.0


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

* Re: [PATCH v2] ASoC: dt-bindings: maxim,max98371: DT schema improvement
  2023-04-01  3:57 ` [PATCH v2] ASoC: dt-bindings: maxim,max98371: DT schema improvement André Morishita
@ 2023-04-01  9:45   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-01  9:45 UTC (permalink / raw)
  To: André Morishita, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, anish kumar, alsa-devel, devicetree,
	linux-kernel
  Cc: mairacanal, dri-devel, daniel.baluta

On 01/04/2023 05:57, André Morishita wrote:
> Improve Maxim Integrated MAX98371 audio codec bindings DT schema conversion

Your patch changed much more than your commit log is saying. I don't
understand why. Previous subject was better than this, I only commented
on missing prefix.

Commit msg now is unspecific and misses full stop. I don't understand/

Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets.

> 
> Signed-off-by: André Morishita <andremorishita@gmail.com>
> ---
> Changes in v2
> - Generic node names - codec (Krzysztof)
> - Drop label max98371 (Krzysztof)
> - Add sound-dai-cells in example (Krzysztof)


Best regards,
Krzysztof


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

end of thread, other threads:[~2023-04-01  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31  2:05 [PATCH] dt-bindings: maxim,max98371: Convert to DT schema André Morishita
2023-03-31  9:47 ` Krzysztof Kozlowski
2023-03-31  9:47 ` Krzysztof Kozlowski
2023-04-01  3:57 ` [PATCH v2] ASoC: dt-bindings: maxim,max98371: DT schema improvement André Morishita
2023-04-01  9:45   ` Krzysztof Kozlowski

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