* [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema
@ 2026-11-09 16:55 Lorena Tanase
2026-11-09 17:07 ` sashiko-bot
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Lorena Tanase @ 2026-11-09 16:55 UTC (permalink / raw)
To: lgirdwood, broonie, robh, krzk+dt, conor+dt
Cc: linux-sound, devicetree, linux-kernel, Lorena Tanase
Convert the WM8741 audio CODEC bindings to DT schema.
Signed-off-by: Lorena Tanase <tanaselorena3@gmail.com>
---
.../devicetree/bindings/sound/wlf,wm8741.yaml | 40 +++++++++++++++++++
.../devicetree/bindings/sound/wm8741.txt | 29 --------------
2 files changed, 40 insertions(+), 29 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/wm8741.txt
diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
new file mode 100644
index 000000000000..a9a7fc2414bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/wlf,wm8741.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: WM8741 audio codec
+
+description: |
+ Wolfson Microelectronics WM8741 audio CODEC
+
+maintainers:
+ - patches@opensource.cirrus.com
+
+properties:
+ compatible:
+ const: wlf,wm8741
+
+ reg:
+ maxItems: 1
+
+diff-mode:
+ description: diferential output mode
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3]
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ wm8903: codec@1a {
+ compatible = "wlf,wm8741";
+ reg = <0x1a>;
+
+ diff-mode = <3>;
+ };
diff --git a/Documentation/devicetree/bindings/sound/wm8741.txt b/Documentation/devicetree/bindings/sound/wm8741.txt
deleted file mode 100644
index b69e196c741c..000000000000
--- a/Documentation/devicetree/bindings/sound/wm8741.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-WM8741 audio CODEC
-
-This device supports both I2C and SPI (configured with pin strapping
-on the board).
-
-Required properties:
-
- - compatible : "wlf,wm8741"
-
- - reg : the I2C address of the device for I2C, the chip select
- number for SPI.
-
-Optional properties:
-
- - diff-mode: Differential output mode configuration. Default value for field
- DIFF in register R8 (MODE_CONTROL_2). If absent, the default is 0, shall be:
- 0 = stereo
- 1 = mono left
- 2 = stereo reversed
- 3 = mono right
-
-Example:
-
-wm8741: codec@1a {
- compatible = "wlf,wm8741";
- reg = <0x1a>;
-
- diff-mode = <3>;
-};
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema
2026-11-09 16:55 [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema Lorena Tanase
@ 2026-11-09 17:07 ` sashiko-bot
2026-11-10 8:09 ` Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-09 17:07 UTC (permalink / raw)
To: Lorena Tanase; +Cc: linux-sound, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] ASoC: dt-bindings: wm8741: diff-mode placed at root level of
YAML schema
- [Medium] ASoC: dt-bindings: wm8741: invalid example bus addressing and
trailing spaces
- [Low] ASoC: dt-bindings: wm8741: missing supplies, DAI, and SPI
properties in schema
- [Low] ASoC: dt-bindings: wm8741: dangling sound/wm* file entry in
MAINTAINERS
--
commit 9c3870a4814d3bc22a021bf5687bbcb6d6e76c1c
Author: Lorena Tanase <tanaselorena3@gmail.com>
ASoC: dt-bindings: wm8741: Convert to DT schema
This commit converts the Wolfson Microelectronics wm8741 audio codec device
tree binding from plain text to yaml schema format.
> diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
> new file mode 100644
> index 0000000000000..a9a7fc2414bb6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
> @@ -0,0 +1,40 @@
[ ... ]
> +properties:
> + compatible:
> + const: wlf,wm8741
> +
> + reg:
> + maxItems: 1
[Severity: Low]
Should this schema also document the regulator supplies, #sound-dai-cells,
and spi peripheral properties?
Both wm8741_i2c_probe() and wm8741_spi_probe() in sound/soc/codecs/wm8741.c
request the avdd and dvdd supplies via devm_regulator_bulk_get(), and the
device supports both i2c and spi buses:
sound/soc/codecs/wm8741.c:
static const char *wm8741_supply_names[WM8741_NUM_SUPPLIES] = {
"AVDD",
"DVDD",
};
Because the schema sets additionalProperties: false, device tree nodes for
wlf,wm8741 that specify avdd-supply, dvdd-supply, #sound-dai-cells, or spi
properties such as spi-max-frequency will fail dtbs_check unless those
properties and refs to dai-common.yaml# and
/schemas/spi/spi-peripheral-props.yaml# (with unevaluatedProperties: false)
are included.
> +
> +diff-mode:
> + description: diferential output mode
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3]
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
[Severity: Medium]
Is diff-mode placed at the root of the document instead of indented under
properties?
At column 0, diff-mode is rejected by dt-doc-validate as an unknown
top-level keyword during make dt_binding_check, and any node using
diff-mode (including the example below) fails validation against
additionalProperties: false.
Compared to wm8741.txt, this entry also drops default: 0 and the
descriptions of the four mode values (0 = stereo, 1 = mono left,
2 = stereo reversed, 3 = mono right), and misspells differential as
diferential.
> +
> +examples:
> + - |
> + wm8903: codec@1a {
> + compatible = "wlf,wm8741";
> + reg = <0x1a>;
> +
> + diff-mode = <3>;
> + };
[Severity: Medium]
Should codec@1a in the example be wrapped in an i2c or spi bus node?
Without a parent bus node setting #address-cells = <1> and
#size-cells = <0>, dt-extract-example uses the default root cell sizes of 1
and 1, causing dtc to fail on reg = <0x1a> with a reg_format error during
make dt_binding_check.
The diff-mode = <3>; line also has four trailing spaces that cause yamllint
to fail, and the node uses an unused wm8903 label with 2-space indentation
instead of standard 4-space example indentation.
> diff --git a/Documentation/devicetree/bindings/sound/wm8741.txt b/Documentation/devicetree/bindings/sound/wm8741.txt
> deleted file mode 100644
> index b69e196c741c4..0000000000000
> --- a/Documentation/devicetree/bindings/sound/wm8741.txt
> +++ /dev/null
[Severity: Low]
Does removing Documentation/devicetree/bindings/sound/wm8741.txt leave a
dangling file pattern in the maintainers file?
wm8741.txt was the last file matching
Documentation/devicetree/bindings/sound/wm*, while the new yaml file is
already covered by Documentation/devicetree/bindings/sound/wlf,*.yaml, so
get_maintainer.pl --self-test=patterns will warn unless the sound/wm* entry
is removed.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109165522.6663-1-tanaselorena3@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema
2026-11-09 16:55 [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema Lorena Tanase
2026-11-09 17:07 ` sashiko-bot
@ 2026-11-10 8:09 ` Krzysztof Kozlowski
2026-11-10 8:09 ` Krzysztof Kozlowski
2026-11-10 18:15 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-10 8:09 UTC (permalink / raw)
To: Lorena Tanase
Cc: lgirdwood, broonie, robh, krzk+dt, conor+dt, linux-sound,
devicetree, linux-kernel
On Mon, Nov 09, 2026 at 06:55:22PM +0200, Lorena Tanase wrote:
> Convert the WM8741 audio CODEC bindings to DT schema.
>
> Signed-off-by: Lorena Tanase <tanaselorena3@gmail.com>
> ---
> .../devicetree/bindings/sound/wlf,wm8741.yaml | 40 +++++++++++++++++++
> .../devicetree/bindings/sound/wm8741.txt | 29 --------------
> 2 files changed, 40 insertions(+), 29 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wm8741.txt
>
> diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
> new file mode 100644
> index 000000000000..a9a7fc2414bb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/wlf,wm8741.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/wlf,wm8741.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: WM8741 audio codec
> +
> +description: |
> + Wolfson Microelectronics WM8741 audio CODEC
> +
> +maintainers:
> + - patches@opensource.cirrus.com
> +
> +properties:
> + compatible:
> + const: wlf,wm8741
> +
> + reg:
> + maxItems: 1
> +
> +diff-mode:
> + description: diferential output mode
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3]
You never tested your code.
The main point of this commit is to convert to DT schema, right? So if
you do not test if resulting DT schema is correct, this makes absolutely
no sense. Please read ALL existing docs in DT/bindings directory.
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + wm8903: codec@1a {
> + compatible = "wlf,wm8741";
> + reg = <0x1a>;
> +
> + diff-mode = <3>;
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.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema
2026-11-09 16:55 [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema Lorena Tanase
2026-11-09 17:07 ` sashiko-bot
2026-11-10 8:09 ` Krzysztof Kozlowski
@ 2026-11-10 8:09 ` Krzysztof Kozlowski
2026-11-10 18:15 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-10 8:09 UTC (permalink / raw)
To: Lorena Tanase
Cc: lgirdwood, broonie, robh, krzk+dt, conor+dt, linux-sound,
devicetree, linux-kernel
On Mon, Nov 09, 2026 at 06:55:22PM +0200, Lorena Tanase wrote:
> Convert the WM8741 audio CODEC bindings to DT schema.
>
> Signed-off-by: Lorena Tanase <tanaselorena3@gmail.com>
> ---
Where is the changelog for v2?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema
2026-11-09 16:55 [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema Lorena Tanase
` (2 preceding siblings ...)
2026-11-10 8:09 ` Krzysztof Kozlowski
@ 2026-11-10 18:15 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-11-10 18:15 UTC (permalink / raw)
To: Lorena Tanase
Cc: lgirdwood, broonie, robh, krzk+dt, conor+dt, linux-sound,
devicetree, linux-kernel
> Convert the WM8741 audio CODEC bindings to DT schema.
Please remember to copy the Cirrus maintainers on new versions...
> +
> +maintainers:
> + - patches@opensource.cirrus.com
...especially given that you're voulunteering them to be maintainers.
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-10 18:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 16:55 [PATCH v2] ASoC: dt-bindings: wm8741: Convert to DT schema Lorena Tanase
2026-11-09 17:07 ` sashiko-bot
2026-11-10 8:09 ` Krzysztof Kozlowski
2026-11-10 8:09 ` Krzysztof Kozlowski
2026-11-10 18:15 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox