mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
@ 2023-03-15 23:10 Vijaya Anand
  2023-03-16  8:03 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vijaya Anand @ 2023-03-15 23:10 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, linux-kernel
  Cc: Vijaya Anand, Daniel Baluta

Convert the binding document for adi,adau17x1 from txt to yaml
so one could validate dt-entries correctly and any future additions
can go into yaml format. Add address and size cells to example to
prevent errors regarding reg format.

Signed-off-by: Vijaya Anand <sunrockers8@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- added 'Codec' in title to clarify type of devices
- put compatible devices in lexographic order
- changed description of clocks
- changed 'unevaluatedProperties' to 'additionalProperties'
- changed node names to be generic

---
 .../bindings/sound/adi,adau17x1.txt           | 32 ------------
 .../bindings/sound/adi,adau17x1.yaml          | 52 +++++++++++++++++++
 2 files changed, 52 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.txt
 create mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.yaml

diff --git a/Documentation/devicetree/bindings/sound/adi,adau17x1.txt b/Documentation/devicetree/bindings/sound/adi,adau17x1.txt
deleted file mode 100644
index 1447dec28125..000000000000
--- a/Documentation/devicetree/bindings/sound/adi,adau17x1.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Analog Devices ADAU1361/ADAU1461/ADAU1761/ADAU1961/ADAU1381/ADAU1781
-
-Required properties:
-
- - compatible:		Should contain one of the following:
-			"adi,adau1361"
-			"adi,adau1461"
-			"adi,adau1761"
-			"adi,adau1961"
-			"adi,adau1381"
-			"adi,adau1781"
-
- - reg:			The i2c address. Value depends on the state of ADDR0
-			and ADDR1, as wired in hardware.
-
-Optional properties:
- - clock-names:		If provided must be "mclk".
- - clocks:		phandle + clock-specifiers for the clock that provides
-			the audio master clock for the device.
-
-Examples:
-#include <dt-bindings/sound/adau17x1.h>
-
-	i2c_bus {
-		adau1361@38 {
-			compatible = "adi,adau1761";
-			reg = <0x38>;
-
-			clock-names = "mclk";
-			clocks = <&audio_clock>;
-		};
-	};
diff --git a/Documentation/devicetree/bindings/sound/adi,adau17x1.yaml b/Documentation/devicetree/bindings/sound/adi,adau17x1.yaml
new file mode 100644
index 000000000000..8ef1e7f6ec91
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,adau17x1.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,adau17x1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title:
+ Analog Devices ADAU1361/ADAU1461/ADAU1761/ADAU1961/ADAU1381/ADAU1781 Codec
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+
+properties:
+  compatible:
+    enum:
+      - adi,adau1361
+      - adi,adau1381
+      - adi,adau1461
+      - adi,adau1761
+      - adi,adau1781
+      - adi,adau1961
+
+  reg:
+    maxItems: 1
+    description:
+      The i2c address. Value depends on the state of ADDR0 and ADDR1,
+      as wired in hardware.
+
+  clock-names:
+    const: mclk
+
+  clocks:
+    items:
+      - description: provides the audio master clock for the device.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      audio-codec@38 {
+        compatible = "adi,adau1761";
+        reg = <0x38>;
+        clock-names = "mclk";
+        clocks = <&audio_clock>;
+      };
+    };
-- 
2.37.1 (Apple Git-137.1)


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

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-15 23:10 [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema Vijaya Anand
@ 2023-03-16  8:03 ` Krzysztof Kozlowski
  2023-03-16 13:53 ` Rob Herring
  2023-03-16 14:18 ` Mark Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-16  8:03 UTC (permalink / raw)
  To: Vijaya Anand, lgirdwood, broonie, robh+dt,
	krzysztof.kozlowski+dt, alsa-devel, devicetree, linux-kernel
  Cc: Daniel Baluta

On 16/03/2023 00:10, Vijaya Anand wrote:
> Convert the binding document for adi,adau17x1 from txt to yaml
> so one could validate dt-entries correctly and any future additions
> can go into yaml format. Add address and size cells to example to
> prevent errors regarding reg format.
> 
> Signed-off-by: Vijaya Anand <sunrockers8@gmail.com>
> Cc: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Changes since v1:
> - added 'Codec' in title to clarify type of devices
> - put compatible devices in lexographic order
> - changed description of clocks
> - changed 'unevaluatedProperties' to 'additionalProperties'
> - changed node names to be generic

You sent a v2, so this should be v3. Keep it consistent, otherwise it
confuses reviewers...

> 
> ---
>  .../bindings/sound/adi,adau17x1.txt           | 32 ------------
>  .../bindings/sound/adi,adau17x1.yaml          | 52 +++++++++++++++++++
>  2 files changed, 52 insertions(+), 32 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.yaml


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-15 23:10 [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema Vijaya Anand
  2023-03-16  8:03 ` Krzysztof Kozlowski
@ 2023-03-16 13:53 ` Rob Herring
  2023-03-16 19:17   ` Krzysztof Kozlowski
  2023-03-16 14:18 ` Mark Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2023-03-16 13:53 UTC (permalink / raw)
  To: Vijaya Anand
  Cc: broonie, Daniel Baluta, robh+dt, lgirdwood, devicetree,
	linux-kernel, krzysztof.kozlowski+dt, alsa-devel


On Thu, 16 Mar 2023 04:40:55 +0530, Vijaya Anand wrote:
> Convert the binding document for adi,adau17x1 from txt to yaml
> so one could validate dt-entries correctly and any future additions
> can go into yaml format. Add address and size cells to example to
> prevent errors regarding reg format.
> 
> Signed-off-by: Vijaya Anand <sunrockers8@gmail.com>
> Cc: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Changes since v1:
> - added 'Codec' in title to clarify type of devices
> - put compatible devices in lexographic order
> - changed description of clocks
> - changed 'unevaluatedProperties' to 'additionalProperties'
> - changed node names to be generic
> 
> ---
>  .../bindings/sound/adi,adau17x1.txt           | 32 ------------
>  .../bindings/sound/adi,adau17x1.yaml          | 52 +++++++++++++++++++
>  2 files changed, 52 insertions(+), 32 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/sound/adi,adau17x1.yaml:8:2: [warning] wrong indentation: expected 2 but found 1 (indentation)

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/sound/adi,adau17x1.example.dts:29.3-30.1 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/sound/adi,adau17x1.example.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1512: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230315231055.3067-1-sunrockers8@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-15 23:10 [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema Vijaya Anand
  2023-03-16  8:03 ` Krzysztof Kozlowski
  2023-03-16 13:53 ` Rob Herring
@ 2023-03-16 14:18 ` Mark Brown
  2023-03-16 19:16   ` Krzysztof Kozlowski
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2023-03-16 14:18 UTC (permalink / raw)
  To: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, linux-kernel, Vijaya Anand
  Cc: Daniel Baluta

On Thu, 16 Mar 2023 04:40:55 +0530, Vijaya Anand wrote:
> Convert the binding document for adi,adau17x1 from txt to yaml
> so one could validate dt-entries correctly and any future additions
> can go into yaml format. Add address and size cells to example to
> prevent errors regarding reg format.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
      commit: 87771c94025890246a6dfec9773eb62bd41c4c5a

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] 8+ messages in thread

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-16 14:18 ` Mark Brown
@ 2023-03-16 19:16   ` Krzysztof Kozlowski
  2023-03-16 19:45     ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-16 19:16 UTC (permalink / raw)
  To: Mark Brown, lgirdwood, robh+dt, krzysztof.kozlowski+dt,
	alsa-devel, devicetree, linux-kernel, Vijaya Anand
  Cc: Daniel Baluta

On 16/03/2023 15:18, Mark Brown wrote:
> On Thu, 16 Mar 2023 04:40:55 +0530, Vijaya Anand wrote:
>> Convert the binding document for adi,adau17x1 from txt to yaml
>> so one could validate dt-entries correctly and any future additions
>> can go into yaml format. Add address and size cells to example to
>> prevent errors regarding reg format.
>>
>>
> 
> Applied to
> 
>    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
> 
> Thanks!
> 
> [1/1] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
>       commit: 87771c94025890246a6dfec9773eb62bd41c4c5a

Hi Mark,

There was a warning from Rob's bot. Can you drop the patch or you expect
follow-up?

Best regards,
Krzysztof


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

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-16 13:53 ` Rob Herring
@ 2023-03-16 19:17   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-16 19:17 UTC (permalink / raw)
  To: Rob Herring, Vijaya Anand
  Cc: broonie, Daniel Baluta, robh+dt, lgirdwood, devicetree,
	linux-kernel, krzysztof.kozlowski+dt, alsa-devel

On 16/03/2023 14:53, Rob Herring wrote:
> 
> On Thu, 16 Mar 2023 04:40:55 +0530, Vijaya Anand wrote:
>> Convert the binding document for adi,adau17x1 from txt to yaml
>> so one could validate dt-entries correctly and any future additions
>> can go into yaml format. Add address and size cells to example to
>> prevent errors regarding reg format.
>>
>> Signed-off-by: Vijaya Anand <sunrockers8@gmail.com>
>> Cc: Daniel Baluta <daniel.baluta@nxp.com>
>> ---
>> Changes since v1:
>> - added 'Codec' in title to clarify type of devices
>> - put compatible devices in lexographic order
>> - changed description of clocks
>> - changed 'unevaluatedProperties' to 'additionalProperties'
>> - changed node names to be generic
>>
>> ---
>>  .../bindings/sound/adi,adau17x1.txt           | 32 ------------
>>  .../bindings/sound/adi,adau17x1.yaml          | 52 +++++++++++++++++++
>>  2 files changed, 52 insertions(+), 32 deletions(-)
>>  delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.txt
>>  create mode 100644 Documentation/devicetree/bindings/sound/adi,adau17x1.yaml
>>
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> ./Documentation/devicetree/bindings/sound/adi,adau17x1.yaml:8:2: [warning] wrong indentation: expected 2 but found 1 (indentation)
> 
> dtschema/dtc warnings/errors:
> Error: Documentation/devicetree/bindings/sound/adi,adau17x1.example.dts:29.3-30.1 syntax error
> FATAL ERROR: Unable to parse input tree
> make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/sound/adi,adau17x1.example.dtb] Error 1

Test your patches before sending... this never worked.

Best regards,
Krzysztof


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

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-16 19:16   ` Krzysztof Kozlowski
@ 2023-03-16 19:45     ` Mark Brown
  2023-03-17  9:25       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2023-03-16 19:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, linux-kernel, Vijaya Anand, Daniel Baluta

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

On Thu, Mar 16, 2023 at 08:16:29PM +0100, Krzysztof Kozlowski wrote:

> There was a warning from Rob's bot. Can you drop the patch or you expect
> follow-up?

A followup would be easiest.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
  2023-03-16 19:45     ` Mark Brown
@ 2023-03-17  9:25       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-17  9:25 UTC (permalink / raw)
  To: Mark Brown
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, linux-kernel, Vijaya Anand, Daniel Baluta

On 16/03/2023 20:45, Mark Brown wrote:
> On Thu, Mar 16, 2023 at 08:16:29PM +0100, Krzysztof Kozlowski wrote:
> 
>> There was a warning from Rob's bot. Can you drop the patch or you expect
>> follow-up?
> 
> A followup would be easiest.

Sent one.

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-03-17  9:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 23:10 [PATCH v2] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema Vijaya Anand
2023-03-16  8:03 ` Krzysztof Kozlowski
2023-03-16 13:53 ` Rob Herring
2023-03-16 19:17   ` Krzysztof Kozlowski
2023-03-16 14:18 ` Mark Brown
2023-03-16 19:16   ` Krzysztof Kozlowski
2023-03-16 19:45     ` Mark Brown
2023-03-17  9:25       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®