linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-bindings: rt5682s: correct several errors
@ 2021-09-20 11:21 Krzysztof Kozlowski
  2021-09-20 15:30 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-20 11:21 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Derek Fang, alsa-devel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Correct several errors in rt5682s dtschema:
1. The examples should be under "examples":
    'example' is not one of ['$id', '$schema', 'title', 'description', 'examples', ...

2. Missing type for vendor properties

3. clock-names should be an array:
    properties:clock-names:items: {'const': 'mclk'} is not of type 'array'

4. Example DTS should include headers:
    [scripts/Makefile.lib:386: Documentation/devicetree/bindings/sound/realtek,rt5682s.example.dt.yaml] Error 1

5. Node name in example DTS misses unit address and does not match DT
   convention (generic name):
    Warning (reg_format): /example-0/rt5682s:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

6. Node address should be in size-cells:0 block in example DTS:
    Warning (reg_format): /example-0/codec@1a:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

Fixes: 50159fdb144b ("ASoC: dt-bindings: rt5682s: add bindings for rt5682s")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 .../bindings/sound/realtek,rt5682s.yaml       | 47 ++++++++++++-------
 1 file changed, 29 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
index fbf23696f1a7..7a5f1d0fd3e2 100644
--- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
@@ -24,18 +24,21 @@ properties:
     description: The CODEC's interrupt output.
 
   realtek,dmic1-data-pin:
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum:
       - 0 # dmic1 data is not used
       - 1 # using GPIO2 pin as dmic1 data pin
       - 2 # using GPIO5 pin as dmic1 data pin
 
   realtek,dmic1-clk-pin:
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum:
       - 0 # dmic1 clk is not used
       - 1 # using GPIO1 pin as dmic1 clock pin
       - 2 # using GPIO3 pin as dmic1 clock pin
 
   realtek,jd-src:
+    $ref: /schemas/types.yaml#/definitions/uint32
     enum:
       - 0 # No JD is used
       - 1 # using JD1 as JD source
@@ -63,7 +66,7 @@ properties:
 
   clock-names:
     items:
-      const: mclk
+      - const: mclk
 
   "#clock-cells":
     const: 1
@@ -79,22 +82,30 @@ required:
   - compatible
   - reg
 
-example:
+examples:
   - |
-    rt5682s {
-        compatible = "realtek,rt5682s";
-        reg = <0x1a>;
-        interrupt-parent = <&gpio>;
-        interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
-        realtek,ldo1-en-gpios =
-            <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
-        realtek,dmic1-data-pin = <1>;
-        realtek,dmic1-clk-pin = <1>;
-        realtek,jd-src = <1>;
-
-        #clock-cells = <1>;
-        clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
-
-        clocks = <&osc>;
-        clock-names = "mclk";
+    #include <dt-bindings/gpio/tegra-gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        codec@1a {
+            compatible = "realtek,rt5682s";
+            reg = <0x1a>;
+            interrupt-parent = <&gpio>;
+            interrupts = <TEGRA_GPIO(U, 6) IRQ_TYPE_LEVEL_HIGH>;
+            realtek,ldo1-en-gpios =
+                <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
+            realtek,dmic1-data-pin = <1>;
+            realtek,dmic1-clk-pin = <1>;
+            realtek,jd-src = <1>;
+
+            #clock-cells = <1>;
+            clock-output-names = "rt5682-dai-wclk", "rt5682-dai-bclk";
+
+            clocks = <&osc>;
+            clock-names = "mclk";
+        };
     };
-- 
2.30.2


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

* Re: [PATCH] ASoC: dt-bindings: rt5682s: correct several errors
  2021-09-20 11:21 [PATCH] ASoC: dt-bindings: rt5682s: correct several errors Krzysztof Kozlowski
@ 2021-09-20 15:30 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-09-20 15:30 UTC (permalink / raw)
  To: Derek Fang, devicetree, Krzysztof Kozlowski, linux-kernel,
	Rob Herring, Liam Girdwood, alsa-devel
  Cc: Mark Brown

On Mon, 20 Sep 2021 13:21:06 +0200, Krzysztof Kozlowski wrote:
> Correct several errors in rt5682s dtschema:
> 1. The examples should be under "examples":
>     'example' is not one of ['$id', '$schema', 'title', 'description', 'examples', ...
> 
> 2. Missing type for vendor properties
> 
> 3. clock-names should be an array:
>     properties:clock-names:items: {'const': 'mclk'} is not of type 'array'
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: dt-bindings: rt5682s: correct several errors
      commit: a7a18abbd26caf22e40165eb734e67d338735f5b

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

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

end of thread, other threads:[~2021-09-20 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 11:21 [PATCH] ASoC: dt-bindings: rt5682s: correct several errors Krzysztof Kozlowski
2021-09-20 15:30 ` Mark Brown

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