linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: adau1977: convert text binding to yaml format
@ 2020-11-06 10:20 Alexandru Ardelean
  2020-11-06 16:17 ` Rob Herring
  2020-11-10  8:47 ` [PATCH v2] " Alexandru Ardelean
  0 siblings, 2 replies; 7+ messages in thread
From: Alexandru Ardelean @ 2020-11-06 10:20 UTC (permalink / raw)
  To: alsa-devel, devicetree, linux-kernel
  Cc: lars, bogdan.togorean, robh+dt, broonie, lgirdwood, Alexandru Ardelean

This change converts the old device-tree binding for ADAU1977 from text
format to the new yaml format.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 .../bindings/sound/adi,adau1977.txt           | 61 ---------------
 .../bindings/sound/adi,adau1977.yaml          | 77 +++++++++++++++++++
 2 files changed, 77 insertions(+), 61 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.txt
 create mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.yaml

diff --git a/Documentation/devicetree/bindings/sound/adi,adau1977.txt b/Documentation/devicetree/bindings/sound/adi,adau1977.txt
deleted file mode 100644
index 37f8aad01203..000000000000
--- a/Documentation/devicetree/bindings/sound/adi,adau1977.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-Analog Devices ADAU1977/ADAU1978/ADAU1979
-
-Datasheets:
-https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
-https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
-https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
-
-This driver supports both the I2C and SPI bus.
-
-Required properties:
- - compatible: Should contain one of the following:
-               "adi,adau1977"
-               "adi,adau1978"
-               "adi,adau1979"
-
- - AVDD-supply: analog power supply for the device, please consult
-                Documentation/devicetree/bindings/regulator/regulator.txt
-
-Optional properties:
- - reset-gpios: the reset pin for the chip, for more details consult
-                Documentation/devicetree/bindings/gpio/gpio.txt
-
- - DVDD-supply: supply voltage for the digital core, please consult
-                Documentation/devicetree/bindings/regulator/regulator.txt
-
-- adi,micbias: configures the voltage setting for the MICBIAS pin.
-		Select 0/1/2/3/4/5/6/7/8 to specify MICBIAS voltage
-		5V/5.5V/6V/6.5V/7V/7.5V/8V/8.5V/9V
-		If not specified the default value will be "7" meaning 8.5 Volts.
-		This property is only valid for the ADAU1977
-
-For required properties on SPI, please consult
-Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Required properties on I2C:
-
- - reg:         The i2c address. Value depends on the state of ADDR0
-                and ADDR1, as wired in hardware.
-
-Examples:
-
-	adau1977_spi: adau1977@0 {
-		compatible = "adi,adau1977";
-		spi-max-frequency = <600000>;
-
-		AVDD-supply = <&regulator>;
-		DVDD-supply = <&regulator_digital>;
-
-		adi,micbias = <3>;
-		reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
-	};
-
-	adau1977_i2c: adau1977@11 {
-		compatible = "adi,adau1977";
-		reg = <0x11>;
-
-		AVDD-supply = <&regulator>;
-		DVDD-supply = <&regulator_digital>;
-
-		reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
-	};
diff --git a/Documentation/devicetree/bindings/sound/adi,adau1977.yaml b/Documentation/devicetree/bindings/sound/adi,adau1977.yaml
new file mode 100644
index 000000000000..bc097b6b066e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,adau1977.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,adau1977.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADAU1977/ADAU1978/ADAU1979 Quad ADC with Diagnostics
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Bogdan Togorean <bogdan.togorean@analog.com>
+
+description: |
+  Analog Devices ADAU1977 and similar quad ADC with Diagnostics
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,adau1977
+      - adi,adau1978
+      - adi,adau1979
+
+  reg:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+  reset-gpios:
+    maxItems: 1
+
+  AVDD-supply:
+    description: Analog power support for the device.
+
+  DVDD-supply:
+    description: Supply voltage for digital core.
+
+  adi,micbias:
+    description: |
+      Configures the voltage setting for the MICBIAS pin.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
+    default: 7
+
+required:
+  - reg
+  - compatible
+  - AVDD-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    adau1977_spi: adau1977@0 {
+        compatible = "adi,adau1977";
+        reg = <0>;
+        spi-max-frequency = <600000>;
+
+        AVDD-supply = <&regulator>;
+        DVDD-supply = <&regulator_digital>;
+
+        adi,micbias = <3>;
+        reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+    };
+  - |
+    adau1977_i2c: adau1977@11 {
+        compatible = "adi,adau1977";
+        reg = <0x11>;
+
+        AVDD-supply = <&regulator>;
+        DVDD-supply = <&regulator_digital>;
+
+        reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+    };
-- 
2.27.0


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

* Re: [PATCH] dt-bindings: adau1977: convert text binding to yaml format
  2020-11-06 10:20 [PATCH] dt-bindings: adau1977: convert text binding to yaml format Alexandru Ardelean
@ 2020-11-06 16:17 ` Rob Herring
  2020-11-10  8:47 ` [PATCH v2] " Alexandru Ardelean
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-11-06 16:17 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: lars, broonie, lgirdwood, linux-kernel, alsa-devel,
	bogdan.togorean, devicetree, robh+dt

On Fri, 06 Nov 2020 12:20:52 +0200, Alexandru Ardelean wrote:
> This change converts the old device-tree binding for ADAU1977 from text
> format to the new yaml format.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  .../bindings/sound/adi,adau1977.txt           | 61 ---------------
>  .../bindings/sound/adi,adau1977.yaml          | 77 +++++++++++++++++++
>  2 files changed, 77 insertions(+), 61 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.yaml
> 


My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/sound/adi,adau1977.example.dts:28.37-38 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/sound/adi,adau1977.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1364: dt_binding_check] Error 2


See https://patchwork.ozlabs.org/patch/1395607

The base for the patch is generally the last rc1. Any dependencies
should be noted.

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.


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

* [PATCH v2] dt-bindings: adau1977: convert text binding to yaml format
  2020-11-06 10:20 [PATCH] dt-bindings: adau1977: convert text binding to yaml format Alexandru Ardelean
  2020-11-06 16:17 ` Rob Herring
@ 2020-11-10  8:47 ` Alexandru Ardelean
  2020-11-16 16:59   ` Rob Herring
                     ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Alexandru Ardelean @ 2020-11-10  8:47 UTC (permalink / raw)
  To: alsa-devel, devicetree, linux-kernel
  Cc: lars, robh+dt, broonie, lgirdwood, Alexandru Ardelean

This change converts the old device-tree binding for ADAU1977 from text
format to the new yaml format.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---

Changelog v1 -> v2:
* updated libraries to catch newer schema errors/warnings
* fixed examples, added i2c & spi nodes

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

diff --git a/Documentation/devicetree/bindings/sound/adi,adau1977.txt b/Documentation/devicetree/bindings/sound/adi,adau1977.txt
deleted file mode 100644
index 37f8aad01203..000000000000
--- a/Documentation/devicetree/bindings/sound/adi,adau1977.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-Analog Devices ADAU1977/ADAU1978/ADAU1979
-
-Datasheets:
-https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
-https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
-https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
-
-This driver supports both the I2C and SPI bus.
-
-Required properties:
- - compatible: Should contain one of the following:
-               "adi,adau1977"
-               "adi,adau1978"
-               "adi,adau1979"
-
- - AVDD-supply: analog power supply for the device, please consult
-                Documentation/devicetree/bindings/regulator/regulator.txt
-
-Optional properties:
- - reset-gpios: the reset pin for the chip, for more details consult
-                Documentation/devicetree/bindings/gpio/gpio.txt
-
- - DVDD-supply: supply voltage for the digital core, please consult
-                Documentation/devicetree/bindings/regulator/regulator.txt
-
-- adi,micbias: configures the voltage setting for the MICBIAS pin.
-		Select 0/1/2/3/4/5/6/7/8 to specify MICBIAS voltage
-		5V/5.5V/6V/6.5V/7V/7.5V/8V/8.5V/9V
-		If not specified the default value will be "7" meaning 8.5 Volts.
-		This property is only valid for the ADAU1977
-
-For required properties on SPI, please consult
-Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Required properties on I2C:
-
- - reg:         The i2c address. Value depends on the state of ADDR0
-                and ADDR1, as wired in hardware.
-
-Examples:
-
-	adau1977_spi: adau1977@0 {
-		compatible = "adi,adau1977";
-		spi-max-frequency = <600000>;
-
-		AVDD-supply = <&regulator>;
-		DVDD-supply = <&regulator_digital>;
-
-		adi,micbias = <3>;
-		reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
-	};
-
-	adau1977_i2c: adau1977@11 {
-		compatible = "adi,adau1977";
-		reg = <0x11>;
-
-		AVDD-supply = <&regulator>;
-		DVDD-supply = <&regulator_digital>;
-
-		reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
-	};
diff --git a/Documentation/devicetree/bindings/sound/adi,adau1977.yaml b/Documentation/devicetree/bindings/sound/adi,adau1977.yaml
new file mode 100644
index 000000000000..b80454ad97da
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,adau1977.yaml
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/adi,adau1977.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADAU1977/ADAU1978/ADAU1979 Quad ADC with Diagnostics
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Bogdan Togorean <bogdan.togorean@analog.com>
+
+description: |
+  Analog Devices ADAU1977 and similar quad ADC with Diagnostics
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,adau1977
+      - adi,adau1978
+      - adi,adau1979
+
+  reg:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+  reset-gpios:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  AVDD-supply:
+    description: Analog power support for the device.
+
+  DVDD-supply:
+    description: Supply voltage for digital core.
+
+  adi,micbias:
+    description: |
+      Configures the voltage setting for the MICBIAS pin.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
+    default: 7
+
+required:
+  - reg
+  - compatible
+  - AVDD-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        adau1977_spi: adau1977@0 {
+            compatible = "adi,adau1977";
+            reg = <0>;
+            spi-max-frequency = <600000>;
+
+            AVDD-supply = <&regulator>;
+            DVDD-supply = <&regulator_digital>;
+
+            reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+
+            adi,micbias = <3>;
+        };
+    };
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        adau1977_i2c: adau1977@11 {
+            compatible = "adi,adau1977";
+            reg = <0x11>;
+
+            AVDD-supply = <&regulator>;
+            DVDD-supply = <&regulator_digital>;
+
+            reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+        };
+    };
-- 
2.17.1


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

* Re: [PATCH v2] dt-bindings: adau1977: convert text binding to yaml format
  2020-11-10  8:47 ` [PATCH v2] " Alexandru Ardelean
@ 2020-11-16 16:59   ` Rob Herring
  2020-11-16 21:18   ` Mark Brown
  2020-11-17 22:37   ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-11-16 16:59 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: lgirdwood, linux-kernel, lars, alsa-devel, robh+dt, broonie, devicetree

On Tue, 10 Nov 2020 10:47:54 +0200, Alexandru Ardelean wrote:
> This change converts the old device-tree binding for ADAU1977 from text
> format to the new yaml format.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
> 
> Changelog v1 -> v2:
> * updated libraries to catch newer schema errors/warnings
> * fixed examples, added i2c & spi nodes
> 
>  .../bindings/sound/adi,adau1977.txt           | 61 ------------
>  .../bindings/sound/adi,adau1977.yaml          | 92 +++++++++++++++++++
>  2 files changed, 92 insertions(+), 61 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2] dt-bindings: adau1977: convert text binding to yaml format
  2020-11-10  8:47 ` [PATCH v2] " Alexandru Ardelean
  2020-11-16 16:59   ` Rob Herring
@ 2020-11-16 21:18   ` Mark Brown
  2020-11-17 13:52     ` Ardelean, Alexandru
  2020-11-17 22:37   ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2020-11-16 21:18 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: alsa-devel, devicetree, linux-kernel, lars, robh+dt, lgirdwood

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

On Tue, Nov 10, 2020 at 10:47:54AM +0200, Alexandru Ardelean wrote:
> This change converts the old device-tree binding for ADAU1977 from text
> format to the new yaml format.

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.

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

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

* RE: [PATCH v2] dt-bindings: adau1977: convert text binding to yaml format
  2020-11-16 21:18   ` Mark Brown
@ 2020-11-17 13:52     ` Ardelean, Alexandru
  0 siblings, 0 replies; 7+ messages in thread
From: Ardelean, Alexandru @ 2020-11-17 13:52 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, devicetree, linux-kernel, lars, robh+dt, lgirdwood



> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Monday, November 16, 2020 11:19 PM
> To: Ardelean, Alexandru <alexandru.Ardelean@analog.com>
> Cc: alsa-devel@alsa-project.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; lars@metafoo.de; robh+dt@kernel.org;
> lgirdwood@gmail.com
> Subject: Re: [PATCH v2] dt-bindings: adau1977: convert text binding to yaml
> format
> 
> [External]
> 
> On Tue, Nov 10, 2020 at 10:47:54AM +0200, Alexandru Ardelean wrote:
> > This change converts the old device-tree binding for ADAU1977 from
> > text format to the new yaml format.
> 
> 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.

Apologies.
I did look around and the git log of that folder and noticed a bit of mixed styling for the commit title.
I admit I should have probably taken a closer look and better guessed the styling a bit.
I'll try to keep in mind for ASoC bindings.
I do remember Rob complaining [on some older binding patch] that the styling for bindings should be in the format I just did.
¯\_(ツ)_/¯

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

* Re: [PATCH v2] dt-bindings: adau1977: convert text binding to yaml format
  2020-11-10  8:47 ` [PATCH v2] " Alexandru Ardelean
  2020-11-16 16:59   ` Rob Herring
  2020-11-16 21:18   ` Mark Brown
@ 2020-11-17 22:37   ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-11-17 22:37 UTC (permalink / raw)
  To: alsa-devel, devicetree, linux-kernel, Alexandru Ardelean
  Cc: lgirdwood, robh+dt, lars

On Tue, 10 Nov 2020 10:47:54 +0200, Alexandru Ardelean wrote:
> This change converts the old device-tree binding for ADAU1977 from text
> format to the new yaml format.

Applied to

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

Thanks!

[1/1] ASoC: adau1977: convert text binding to yaml format
      commit: f077770b2675feb2ea2188ef7109d5a41545e7a9

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

end of thread, other threads:[~2020-11-17 22:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 10:20 [PATCH] dt-bindings: adau1977: convert text binding to yaml format Alexandru Ardelean
2020-11-06 16:17 ` Rob Herring
2020-11-10  8:47 ` [PATCH v2] " Alexandru Ardelean
2020-11-16 16:59   ` Rob Herring
2020-11-16 21:18   ` Mark Brown
2020-11-17 13:52     ` Ardelean, Alexandru
2020-11-17 22:37   ` 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).