Skip to contentSkip to conversation

dt-bindings: sound: Convert pcm3060 to DT Schema

PATCH In review Padmashree S S 4 participants 11 messages Mar 27 – Apr 21 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 dt-bindings: sound: Convert pcm3060 to DT Schema

Convert pcm3060 to DT Schema

---
 .../devicetree/bindings/sound/pcm3060.txt     | 23 ----------
 .../devicetree/bindings/sound/pcm3060.yaml    | 42 +++++++++++++++++++
 2 files changed, 42 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/pcm3060.txt
 create mode 100644 Documentation/devicetree/bindings/sound/pcm3060.yaml
Documentation/devicetree/bindings/sound/pcm3060.txt deleted +0 -23
deleted file mode 100644
index 97de66932d44..000000000000
@@ -1,23 +0,0 @@
-PCM3060 audio CODEC
-
-This driver supports both I2C and SPI.
-
-Required properties:
-
-- compatible: "ti,pcm3060"
-
-- reg : the I2C address of the device for I2C, the chip select
-        number for SPI.
-
-Optional properties:
-
-- ti,out-single-ended: "true" if output is single-ended;
-                       "false" or not specified if output is differential.
-
-Examples:
-
-	pcm3060: pcm3060@46 {
-		 compatible = "ti,pcm3060";
-		 reg = <0x46>;
-		 ti,out-single-ended = "true";
-	};
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 1 line · Padmashree S S

Convert pcm3060 to DT Schema

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

#2 lore raw
In reply to Padmashree S S
Quoted 6 lines · Padmashree S S

Convert pcm3060 to DT Schema

---
 .../devicetree/bindings/sound/pcm3060.txt     | 23 ----------
 .../devicetree/bindings/sound/pcm3060.yaml    | 42 +++++++++++++++++++

You sent it already after I asked you to slow down and implement previous feedback, so this has the same issues.

Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.

Please use subject prefixes matching the subsystem. You can get them for example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Quoted 3 lines
 2 files changed, 42 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/pcm3060.txt
 create mode 100644 Documentation/devicetree/bindings/sound/pcm3060.yaml

Filename must match compatible.

...

Documentation/devicetree/bindings/sound/pcm3060.yaml line 21

Quoted 7 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +7 -0
+
+  reg:
+    maxItems: 1
+
+  ti,out-single-ended:
+    type: boolean
+    description: |

Drop |

Quoted 6 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +6 -0
+      If present, the output is single-ended.
+      If absent, the output is differential.
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/sound/pcm3060.yaml line 37

Quoted 10 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +10 -0
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pcm3060: audio-codec@46 {

Drop unused label.

Best regards,
Krzysztof

A message that is not in the archive (sent off-list or not yet received): CAEjBr-aoOhbtZWdYvq3rQ3q+2SKUEctTXPdYcoS4mJyrPf-Yqw@mail.gmail.com

#4 lore raw
Quoted 69 lines · Padmashree S S
Quoted 65 lines · Krzysztof Kozlowski
Quoted 6 lines · Padmashree S S

Convert pcm3060 to DT Schema

---
 .../devicetree/bindings/sound/pcm3060.txt     | 23 ----------
 .../devicetree/bindings/sound/pcm3060.yaml    | 42 +++++++++++++++++++

You sent it already after I asked you to slow down and implement previous feedback, so this has the same issues.

Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.

Please use subject prefixes matching the subsystem. You can get them for example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Quoted 3 lines
 2 files changed, 42 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/pcm3060.txt
 create mode 100644 Documentation/devicetree/bindings/sound/pcm3060.yaml

Filename must match compatible.

...

Documentation/devicetree/bindings/sound/pcm3060.yaml line 21

Quoted 7 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +7 -0
+
+  reg:
+    maxItems: 1
+
+  ti,out-single-ended:
+    type: boolean
+    description: |

Drop |

Quoted 6 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +6 -0
+      If present, the output is single-ended.
+      If absent, the output is differential.
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/sound/pcm3060.yaml line 37

Quoted 10 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +10 -0
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pcm3060: audio-codec@46 {

Drop unused label.

Best regards,
Krzysztof
Thanks for the review.
I will run checkpatch.pl, address the comments and send an updated version.

#5 lore raw
In reply to Padmashree S S

Hello Padmashree,

overall, your proposed changes look good to me, thank you for taking care of

the DT schema for the pcm3060 driver!

I left a few minor comments below, but i am open for a discussion, if you think

they are not relevant

Quoted 45 lines · Padmashree S S

Convert pcm3060 to DT Schema

---
  .../devicetree/bindings/sound/pcm3060.txt     | 23 ----------
  .../devicetree/bindings/sound/pcm3060.yaml    | 42 +++++++++++++++++++
  2 files changed, 42 insertions(+), 23 deletions(-)

delete mode 100644 Documentation/devicetree/bindings/sound/pcm3060.txt create mode 100644 Documentation/devicetree/bindings/sound/pcm3060.yaml

Documentation/devicetree/bindings/sound/pcm3060.txt deleted +0 -23
deleted file mode 100644
index 97de66932d44..000000000000
@@ -1,23 +0,0 @@
-PCM3060 audio CODEC
-
-This driver supports both I2C and SPI.
-
-Required properties:
-
-- compatible: "ti,pcm3060"
-
-- reg : the I2C address of the device for I2C, the chip select
-        number for SPI.
-
-Optional properties:
-
-- ti,out-single-ended: "true" if output is single-ended;
-                       "false" or not specified if output is differential.
-
-Examples:
-
-	pcm3060: pcm3060@46 {
-		 compatible = "ti,pcm3060";
-		 reg = <0x46>;
-		 ti,out-single-ended = "true";
-	};
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +0 -0
new file mode 100644
index 000000000000..2d920a70bced

Documentation/devicetree/bindings/sound/pcm3060.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +7 -0
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/pcm3060.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PCM3060 audio CODEC

Here, we seem to drop a short description, that this driver supports

I2C and SPI. It's maybe not a big deal, but maybe we could return these details,

as a description property? Let me know what you think

Documentation/devicetree/bindings/sound/pcm3060.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +10 -0
+
+maintainers:
+  - Kirill Marinushkin <[email protected]>
+
+properties:
+  compatible:
+    const: ti,pcm3060
+
+  reg:
+    maxItems: 1

Here, i notice, that we remove the description of the reg property.

It was there originally, and in the 1st version of your patch, but not in v3.

The description here seems important to me - being a documentation, this

yaml could be more helpful, when it describes the meaning of the properties.

Do you think it would be possible to bring the description back?

Quoted 15 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +15 -0
+
+  ti,out-single-ended:
+    type: boolean
+    description: |
+      If present, the output is single-ended.
+      If absent, the output is differential.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |

Documentation/devicetree/bindings/sound/pcm3060.yaml line 42

Quoted 10 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +10 -0
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pcm3060: audio-codec@46 {
+        compatible = "ti,pcm3060";
+        reg = <0x46>;
+        ti,out-single-ended;
+      };
+    };

Best regards,

Kirill

#6 lore raw
Quoted 133 lines · Kirill Marinushkin

Hello Padmashree,

overall, your proposed changes look good to me, thank you for taking care of

the DT schema for the pcm3060 driver!

I left a few minor comments below, but i am open for a discussion, if you think

they are not relevant

Quoted 45 lines · Padmashree S S

Convert pcm3060 to DT Schema

---
  .../devicetree/bindings/sound/pcm3060.txt     | 23 ----------
  .../devicetree/bindings/sound/pcm3060.yaml    | 42 +++++++++++++++++++
  2 files changed, 42 insertions(+), 23 deletions(-)

delete mode 100644 Documentation/devicetree/bindings/sound/pcm3060.txt create mode 100644 Documentation/devicetree/bindings/sound/pcm3060.yaml

Documentation/devicetree/bindings/sound/pcm3060.txt deleted +0 -23
deleted file mode 100644
index 97de66932d44..000000000000
@@ -1,23 +0,0 @@
-PCM3060 audio CODEC
-
-This driver supports both I2C and SPI.
-
-Required properties:
-
-- compatible: "ti,pcm3060"
-
-- reg : the I2C address of the device for I2C, the chip select
-        number for SPI.
-
-Optional properties:
-
-- ti,out-single-ended: "true" if output is single-ended;
-                       "false" or not specified if output is differential.
-
-Examples:
-
-     pcm3060: pcm3060@46 {
-              compatible = "ti,pcm3060";
-              reg = <0x46>;
-              ti,out-single-ended = "true";
-     };
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +0 -0
new file mode 100644
index 000000000000..2d920a70bced

Documentation/devicetree/bindings/sound/pcm3060.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +7 -0
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/pcm3060.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PCM3060 audio CODEC

Here, we seem to drop a short description, that this driver supports

I2C and SPI. It's maybe not a big deal, but maybe we could return these details,

as a description property? Let me know what you think

Documentation/devicetree/bindings/sound/pcm3060.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +10 -0
+
+maintainers:
+  - Kirill Marinushkin <[email protected]>
+
+properties:
+  compatible:
+    const: ti,pcm3060
+
+  reg:
+    maxItems: 1

Here, i notice, that we remove the description of the reg property.

It was there originally, and in the 1st version of your patch, but not in v3.

The description here seems important to me - being a documentation, this

yaml could be more helpful, when it describes the meaning of the properties.

Do you think it would be possible to bring the description back?

Quoted 15 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +15 -0
+
+  ti,out-single-ended:
+    type: boolean
+    description: |
+      If present, the output is single-ended.
+      If absent, the output is differential.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |

Documentation/devicetree/bindings/sound/pcm3060.yaml line 42

Quoted 10 lines
Documentation/devicetree/bindings/sound/pcm3060.yaml new file +10 -0
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pcm3060: audio-codec@46 {
+        compatible = "ti,pcm3060";
+        reg = <0x46>;
+        ti,out-single-ended;
+      };
+    };

Best regards,

Kirill

Thank you for the feedback, I will bring back the descriptions in the next version of this patch.

#7 lore raw

PATCH v4 1/1 ASoC: dt-bindings: ti,pcm3060: add descriptions and rename binding

In reply to Padmashree S S

Add description to reg property and overall binding mentioning that this driver supports both I2C and SPI. Rename binding to match compatible naming convention.

---
Changes in v4:
- Rename binding from pcm3060 to ti,pcm3060
- Add binding description
- Add description to 'reg' property
- Remove unused label in example

Changes in v3:
- Remove description from 'reg' property

---
 .../bindings/sound/{pcm3060.yaml => ti,pcm3060.yaml}   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
 rename Documentation/devicetree/bindings/sound/{pcm3060.yaml => ti,pcm3060.yaml} (74%)
Documentation/devicetree/bindings/sound/ti,pcm3060.yaml renamed from Documentation/devicetree/bindings/sound/pcm3060.yaml +5 -5
similarity index 74%
rename from Documentation/devicetree/bindings/sound/pcm3060.yaml
rename to Documentation/devicetree/bindings/sound/ti,pcm3060.yaml
index ceb6f044b196..5a402d8b7daa 100644
@@ -1,11 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/sound/pcm3060.yaml#
+$id: http://devicetree.org/schemas/sound/ti,pcm3060.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: PCM3060 audio CODEC
 
+description: This driver supports both I2C and SPI.
+
 maintainers:
   - Kirill Marinushkin <[email protected]>
 
@@ -21,9 +23,7 @@ properties:
 
   ti,out-single-ended:
     type: boolean
-    description: |
-      If present, the output is single-ended.
-      If absent, the output is differential.
+    description: If present, the output is single-ended. If absent, the output is differential.
 
 required:
   - compatible
@@ -37,7 +37,7 @@ examples:
       #address-cells = <1>;
       #size-cells = <0>;
 
-      pcm3060: audio-codec@46 {
+      audio-codec@46 {
         compatible = "ti,pcm3060";
         reg = <0x46>;
         ti,out-single-ended;
Signature · 1 line
2.43.0
#8 lore raw

Re: [PATCH v4] ASoC: dt-bindings: ti,pcm3060: add descriptions and rename binding

Quoted 12 lines · Padmashree S S

Add description to reg property and overall binding mentioning that this driver supports both I2C and SPI. Rename binding to match compatible naming convention.

---
Changes in v4:
- Rename binding from pcm3060 to ti,pcm3060
- Add binding description
- Add description to 'reg' property
- Remove unused label in example

Quoted 4 lines

Changes in v3:
- Remove description from 'reg' property

---
 .../bindings/sound/{pcm3060.yaml => ti,pcm3060.yaml}   | 10 +++++-----

What v4 is that of? There is no such file.

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. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH v4] ASoC: dt-bindings: ti,pcm3060: add descriptions and rename binding

Quoted 21 lines · Krzysztof Kozlowski
Quoted 12 lines · Padmashree S S

Add description to reg property and overall binding mentioning that this driver supports both I2C and SPI. Rename binding to match compatible naming convention.

---
Changes in v4:
- Rename binding from pcm3060 to ti,pcm3060
- Add binding description
- Add description to 'reg' property
- Remove unused label in example

Quoted 4 lines

Changes in v3:
- Remove description from 'reg' property

---
 .../bindings/sound/{pcm3060.yaml => ti,pcm3060.yaml}   | 10 +++++-----

What v4 is that of? There is no such file.

Quoted 8 lines

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. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Best regards,
Krzysztof

Thanks for pointing this out.

Since this is a DT binding patch for the same pcm3060 device, I linked it to the previous version. However, I realize the subject changed significantly, which made the threading confusing.

I’m planning to resend it as a new patch in a separate thread. Please let me know if that works.

#10 lore raw

Re: [PATCH v4] ASoC: dt-bindings: ti,pcm3060: add descriptions and rename binding

Hello Padmashree,

Allow me to once more propose this description, which

was in the original .txt, and you included into the patch v1, but removed for v3:

Quoted 5 lines

+ reg:

+ maxItems: 1

+ description: The I2C address of the device or SPI chip select number.

You also probably would like to squash patch v4 with the previous patch v3

Best regards,

Kirill

Quoted 36 lines · Padmashree S S
Quoted 19 lines · Krzysztof Kozlowski
Quoted 12 lines · Padmashree S S

Add description to reg property and overall binding mentioning that this driver supports both I2C and SPI. Rename binding to match compatible naming convention.

---
Changes in v4:
- Rename binding from pcm3060 to ti,pcm3060
- Add binding description
- Add description to 'reg' property
- Remove unused label in example

Quoted 4 lines

Changes in v3:
- Remove description from 'reg' property

---
  .../bindings/sound/{pcm3060.yaml => ti,pcm3060.yaml}   | 10 +++++-----

What v4 is that of? There is no such file.

Quoted 8 lines

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. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Best regards,
Krzysztof

Thanks for pointing this out.

Since this is a DT binding patch for the same pcm3060 device, I linked it to the previous version. However, I realize the subject changed significantly, which made the threading confusing.

I’m planning to resend it as a new patch in a separate thread. Please let me know if that works.

#11 lore raw

Re: [PATCH v4] ASoC: dt-bindings: ti,pcm3060: add descriptions and rename binding

Thank you for the review. I will add the reg description and squash the patch!

Quoted 62 lines · Kirill Marinushkin

Hello Padmashree,

Allow me to once more propose this description, which

was in the original .txt, and you included into the patch v1, but removed for v3:

Quoted 5 lines

+ reg:

+ maxItems: 1

+ description: The I2C address of the device or SPI chip select number.

You also probably would like to squash patch v4 with the previous patch v3

Best regards,

Kirill

Quoted 36 lines · Padmashree S S
Quoted 19 lines · Krzysztof Kozlowski
Quoted 12 lines · Padmashree S S

Add description to reg property and overall binding mentioning that this driver supports both I2C and SPI. Rename binding to match compatible naming convention.

---
Changes in v4:
- Rename binding from pcm3060 to ti,pcm3060
- Add binding description
- Add description to 'reg' property
- Remove unused label in example

Quoted 4 lines

Changes in v3:
- Remove description from 'reg' property

---
  .../bindings/sound/{pcm3060.yaml => ti,pcm3060.yaml}   | 10 +++++-----

What v4 is that of? There is no such file.

Quoted 8 lines

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. See also:
https://elixir.bootlin.com/linux/v6.16-rc2/source/Documentation/process/submitting-patches.rst#L830

Best regards,
Krzysztof

Thanks for pointing this out.

Since this is a DT binding patch for the same pcm3060 device, I linked it to the previous version. However, I realize the subject changed significantly, which made the threading confusing.

I’m planning to resend it as a new patch in a separate thread. Please let me know if that works.