2024-06-11 12:44:31

by Animesh Agarwal

[permalink] [raw]
Subject: [PATCH] dt-bindings: wlf,wm8782: Convert to dtschema

Convert the WM8782 audio codec bindings to DT schema.

Signed-off-by: Animesh Agarwal <[email protected]>
Cc: Daniel Baluta <[email protected]>
---
.../devicetree/bindings/sound/wlf,wm8782.yaml | 47 +++++++++++++++++++
.../devicetree/bindings/sound/wm8782.txt | 24 ----------
2 files changed, 47 insertions(+), 24 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8782.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/wm8782.txt

diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8782.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8782.yaml
new file mode 100644
index 000000000000..d0bbdc9f9ced
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wlf,wm8782.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/wlf,wm8782.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Wolfson Microelectromics WM8782 audio CODEC
+
+maintainers:
+ - [email protected]
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: wlf,wm8782
+
+ Vdda-supply:
+ description: Regulator for the analog power supply (2.7V - 5.5V)
+
+ Vdd-supply:
+ description: Regulator for the digital power supply (2.7V - 3.6V)
+
+ wlf,fsampen:
+ description: FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - Vdda-supply
+ - Vdd-supply
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ wm8782: codec {
+ compatible = "wlf,wm8782";
+ Vdda-supply = <&vdda_supply>;
+ Vdd-supply = <&vdd_supply>;
+ wlf,fsampen = <2>;
+ };
diff --git a/Documentation/devicetree/bindings/sound/wm8782.txt b/Documentation/devicetree/bindings/sound/wm8782.txt
deleted file mode 100644
index 1a28f3280972..000000000000
--- a/Documentation/devicetree/bindings/sound/wm8782.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-WM8782 stereo ADC
-
-This device does not have any control interface or reset pins.
-
-Required properties:
-
- - compatible : "wlf,wm8782"
- - Vdda-supply : phandle to a regulator for the analog power supply (2.7V - 5.5V)
- - Vdd-supply : phandle to a regulator for the digital power supply (2.7V - 3.6V)
-
-Optional properties:
-
- - wlf,fsampen:
- FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
- Defaults to 0 if left unspecified.
-
-Example:
-
-wm8782: stereo-adc {
- compatible = "wlf,wm8782";
- Vdda-supply = <&vdda_supply>;
- Vdd-supply = <&vdd_supply>;
- wlf,fsampen = <2>; /* 192KHz */
-};
--
2.45.1



2024-06-11 20:01:00

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: wlf,wm8782: Convert to dtschema

On Tue, Jun 11, 2024 at 06:14:00PM +0530, Animesh Agarwal wrote:
> Convert the WM8782 audio codec bindings to DT schema.

Missing "ASoC" on the subject. Mark may not see it.

> Signed-off-by: Animesh Agarwal <[email protected]>
> Cc: Daniel Baluta <[email protected]>
> ---
> .../devicetree/bindings/sound/wlf,wm8782.yaml | 47 +++++++++++++++++++
> .../devicetree/bindings/sound/wm8782.txt | 24 ----------
> 2 files changed, 47 insertions(+), 24 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8782.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wm8782.txt

Reviewed-by: Rob Herring (Arm) <[email protected]>


This is yet another binding with no in tree DTS user. That's fine, but
not what I would prioritize converting. There are several ways I would
prioritize what to work on.

- There's a list maintained in CI of number of occurrences of
undocumented (by schema) compatibles[1]. Start at the top (most
occurrences).
- Pick a platform (or family of platform) and get the warnings down to
0 or close. There's a grouping of warnings and undocumented
compatibles by platform family at the same link. Pick something that's
widely used like RPi or RK3399.
- Prioritize newer platforms over older (arm64 rather than
arm32(though there's still new arm32 stuff)).
- Fix warnings treewide from common schemas (i.e. from dtschema).
That's not conversions, but related.

Happy to discuss further what you plan to do. All the DT maintainers are
on IRC (#devicetree on Libera).

Rob

[1] https://gitlab.com/robherring/linux-dt/-/jobs/6918723853

2024-06-12 09:58:41

by Charles Keepax

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: wlf,wm8782: Convert to dtschema

On Tue, Jun 11, 2024 at 06:14:00PM +0530, Animesh Agarwal wrote:
> Convert the WM8782 audio codec bindings to DT schema.
>
> Signed-off-by: Animesh Agarwal <[email protected]>
> Cc: Daniel Baluta <[email protected]>
> ---

Reviewed-by: Charles Keepax <[email protected]>

Thanks,
Charles

2024-06-12 12:01:17

by Animesh Agarwal

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: wlf,wm8782: Convert to dtschema

On Wed, Jun 12, 2024 at 1:30 AM Rob Herring <[email protected]> wrote:
>
> On Tue, Jun 11, 2024 at 06:14:00PM +0530, Animesh Agarwal wrote:
> > Convert the WM8782 audio codec bindings to DT schema.
>
> Missing "ASoC" on the subject. Mark may not see it.
>
> > Signed-off-by: Animesh Agarwal <[email protected]>
> > Cc: Daniel Baluta <[email protected]>
> > ---
> > .../devicetree/bindings/sound/wlf,wm8782.yaml | 47 +++++++++++++++++++
> > .../devicetree/bindings/sound/wm8782.txt | 24 ----------
> > 2 files changed, 47 insertions(+), 24 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8782.yaml
> > delete mode 100644 Documentation/devicetree/bindings/sound/wm8782.txt
>
> Reviewed-by: Rob Herring (Arm) <[email protected]>
>
>
> This is yet another binding with no in tree DTS user. That's fine, but
> not what I would prioritize converting. There are several ways I would
> prioritize what to work on.

I'll resend this patch adding "ASOC" in the subject, thanks for the
advice I'll not prioritize bindings that do not have their DTS in the
tree.

> - There's a list maintained in CI of number of occurrences of
> undocumented (by schema) compatibles[1]. Start at the top (most
> occurrences).
> - Pick a platform (or family of platform) and get the warnings down to
> 0 or close. There's a grouping of warnings and undocumented
> compatibles by platform family at the same link. Pick something that's
> widely used like RPi or RK3399.
> - Prioritize newer platforms over older (arm64 rather than
> arm32(though there's still new arm32 stuff)).
> - Fix warnings treewide from common schemas (i.e. from dtschema).
> That's not conversions, but related.

Thanks for the tips. I'll work accordingly.

Animesh

2024-06-13 09:10:32

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: wlf,wm8782: Convert to dtschema

On Tue, 11 Jun 2024 18:14:00 +0530, Animesh Agarwal wrote:
> Convert the WM8782 audio codec bindings to DT schema.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] dt-bindings: wlf,wm8782: Convert to dtschema
commit: 01e29260c645bb844fb73ad40a022d6647fb52a0

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark