devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema
@ 2023-03-28  9:18 Saalim Quadri
  2023-03-28 10:44 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Saalim Quadri @ 2023-03-28  9:18 UTC (permalink / raw)
  To: krzysztof.kozlowski, broonie, daniel.baluta,
	krzysztof.kozlowski+dt, robh+dt, shengjiu.wang
  Cc: alsa-devel, devicetree, linux-kernel, Saalim Quadri

Convert the AK4458 audio DAC bindings to DT schema.

Signed-off-by: Saalim Quadri <danascape@gmail.com>
---
Changes:
V1 -> V2: Use the correct way for dsd-path property
          Drop ak4458 label form example
V2 -> V3: ak4458 is the only one that does not support dsd-path, so we
          do not require to define an array
V3 -> V4: Add back dsd-path property description
V4 -> V5: Fix yaml format as per example-schema

 .../devicetree/bindings/sound/ak4458.txt      | 28 -------
 .../bindings/sound/asahi-kasei,ak4458.yaml    | 73 +++++++++++++++++++
 2 files changed, 73 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ak4458.txt
 create mode 100644 Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml

diff --git a/Documentation/devicetree/bindings/sound/ak4458.txt b/Documentation/devicetree/bindings/sound/ak4458.txt
deleted file mode 100644
index 0416c14895d6..000000000000
--- a/Documentation/devicetree/bindings/sound/ak4458.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-AK4458 audio DAC
-
-This device supports I2C mode.
-
-Required properties:
-
-- compatible : "asahi-kasei,ak4458" or "asahi-kasei,ak4497"
-- reg : The I2C address of the device for I2C
-
-Optional properties:
-- reset-gpios: A GPIO specifier for the power down & reset pin
-- mute-gpios: A GPIO specifier for the soft mute pin
-- AVDD-supply: Analog power supply
-- DVDD-supply: Digital power supply
-- dsd-path: Select DSD input pins for ak4497
-            0: select #16, #17, #19 pins
-            1: select #3, #4, #5 pins
-
-Example:
-
-&i2c {
-	ak4458: dac@10 {
-		compatible = "asahi-kasei,ak4458";
-		reg = <0x10>;
-		reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>
-		mute-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
new file mode 100644
index 000000000000..0db0c8e923a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4458.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AK4458 audio DAC
+
+maintainers:
+  - Shengjiu Wang <shengjiu.wang@nxp.com>
+
+properties:
+  compatible:
+    enum:
+      - asahi-kasei,ak4458
+      - asahi-kasei,ak4497
+
+  reg:
+    maxItems: 1
+
+  avdd-supply:
+    description: Analog power supply
+
+  dvdd-supply:
+    description: Digital power supply
+
+  reset-gpios:
+    maxItems: 1
+
+  mute-gpios:
+    maxItems: 1
+    description:
+      GPIO used to mute all the outputs
+
+  dsd-path:
+    description: Select DSD input pins for ak4497
+    $ref: /schemas/types.yaml#/definitions/uint32
+    oneOf:
+      - const: 0
+        description: select #16, #17, #19 pins
+      - const: 1
+        description: select #3, #4, #5 pins
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: asahi-kasei,ak4458
+
+    then:
+      properties:
+        dsd-path: false
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        codec@10 {
+            compatible = "asahi-kasei,ak4458";
+            reg = <0x10>;
+            reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+            mute-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+        };
+    };
-- 
2.34.1


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

* Re: [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema
  2023-03-28  9:18 [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema Saalim Quadri
@ 2023-03-28 10:44 ` Krzysztof Kozlowski
  2023-04-02 20:25   ` Saalim Quadri
  2023-04-05 12:48 ` Mark Brown
  2023-04-06 13:12 ` Rob Herring
  2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-28 10:44 UTC (permalink / raw)
  To: Saalim Quadri, broonie, daniel.baluta, krzysztof.kozlowski+dt,
	robh+dt, shengjiu.wang
  Cc: alsa-devel, devicetree, linux-kernel

On 28/03/2023 11:18, Saalim Quadri wrote:
> Convert the AK4458 audio DAC bindings to DT schema.
> 
> Signed-off-by: Saalim Quadri <danascape@gmail.com>
> ---
> Changes:
> V1 -> V2: Use the correct way for dsd-path property
>           Drop ak4458 label form example
> V2 -> V3: ak4458 is the only one that does not support dsd-path, so we
>           do not require to define an array
> V3 -> V4: Add back dsd-path property description
> V4 -> V5: Fix yaml format as per example-schema

Although I did not ask to send a new version, but if you did it, then
you must include my tag. Standard boiler plate below:

This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new
versions. However, there's no need to repost patches *only* to add the
tags. The upstream maintainer will do that for acks received on the
version they apply.

https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540

If a tag was not added on purpose, please state why and what changed.

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

Best regards,
Krzysztof


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

* Re: [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema
  2023-03-28 10:44 ` Krzysztof Kozlowski
@ 2023-04-02 20:25   ` Saalim Quadri
  0 siblings, 0 replies; 5+ messages in thread
From: Saalim Quadri @ 2023-04-02 20:25 UTC (permalink / raw)
  To: krzysztof.kozlowski
  Cc: alsa-devel, broonie, danascape, daniel.baluta, devicetree,
	krzysztof.kozlowski+dt, linux-kernel, robh+dt, shengjiu.wang

The patch has no major change, as mentioned under the changelog.
The alignment was changed according to the comment in v4

Apologies,

Saalim

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

* Re: [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema
  2023-03-28  9:18 [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema Saalim Quadri
  2023-03-28 10:44 ` Krzysztof Kozlowski
@ 2023-04-05 12:48 ` Mark Brown
  2023-04-06 13:12 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-04-05 12:48 UTC (permalink / raw)
  To: krzysztof.kozlowski, daniel.baluta, krzysztof.kozlowski+dt,
	robh+dt, shengjiu.wang, Saalim Quadri
  Cc: alsa-devel, devicetree, linux-kernel

On Tue, 28 Mar 2023 14:48:31 +0530, Saalim Quadri wrote:
> Convert the AK4458 audio DAC bindings to DT schema.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: dt-bindings: ak4458: Convert to dtschema
      commit: 009e83b591ddcd945f0d48209debfb8dca967166

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

* Re: [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema
  2023-03-28  9:18 [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema Saalim Quadri
  2023-03-28 10:44 ` Krzysztof Kozlowski
  2023-04-05 12:48 ` Mark Brown
@ 2023-04-06 13:12 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-04-06 13:12 UTC (permalink / raw)
  To: Saalim Quadri
  Cc: krzysztof.kozlowski, broonie, daniel.baluta,
	krzysztof.kozlowski+dt, shengjiu.wang, alsa-devel, devicetree,
	linux-kernel

On Tue, Mar 28, 2023 at 4:18 AM Saalim Quadri <danascape@gmail.com> wrote:
>
> Convert the AK4458 audio DAC bindings to DT schema.
>
> Signed-off-by: Saalim Quadri <danascape@gmail.com>
> ---
> Changes:
> V1 -> V2: Use the correct way for dsd-path property
>           Drop ak4458 label form example
> V2 -> V3: ak4458 is the only one that does not support dsd-path, so we
>           do not require to define an array
> V3 -> V4: Add back dsd-path property description
> V4 -> V5: Fix yaml format as per example-schema
>
>  .../devicetree/bindings/sound/ak4458.txt      | 28 -------
>  .../bindings/sound/asahi-kasei,ak4458.yaml    | 73 +++++++++++++++++++
>  2 files changed, 73 insertions(+), 28 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/ak4458.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/ak4458.txt b/Documentation/devicetree/bindings/sound/ak4458.txt
> deleted file mode 100644
> index 0416c14895d6..000000000000
> --- a/Documentation/devicetree/bindings/sound/ak4458.txt
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -AK4458 audio DAC
> -
> -This device supports I2C mode.
> -
> -Required properties:
> -
> -- compatible : "asahi-kasei,ak4458" or "asahi-kasei,ak4497"
> -- reg : The I2C address of the device for I2C
> -
> -Optional properties:
> -- reset-gpios: A GPIO specifier for the power down & reset pin
> -- mute-gpios: A GPIO specifier for the soft mute pin
> -- AVDD-supply: Analog power supply
> -- DVDD-supply: Digital power supply
> -- dsd-path: Select DSD input pins for ak4497
> -            0: select #16, #17, #19 pins
> -            1: select #3, #4, #5 pins
> -
> -Example:
> -
> -&i2c {
> -       ak4458: dac@10 {
> -               compatible = "asahi-kasei,ak4458";
> -               reg = <0x10>;
> -               reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>
> -               mute-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>
> -       };
> -};
> diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
> new file mode 100644
> index 000000000000..0db0c8e923a0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml
> @@ -0,0 +1,73 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4458.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: AK4458 audio DAC
> +
> +maintainers:
> +  - Shengjiu Wang <shengjiu.wang@nxp.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - asahi-kasei,ak4458
> +      - asahi-kasei,ak4497
> +
> +  reg:
> +    maxItems: 1
> +
> +  avdd-supply:
> +    description: Analog power supply
> +
> +  dvdd-supply:
> +    description: Digital power supply
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  mute-gpios:
> +    maxItems: 1
> +    description:
> +      GPIO used to mute all the outputs
> +
> +  dsd-path:
> +    description: Select DSD input pins for ak4497
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    oneOf:
> +      - const: 0
> +        description: select #16, #17, #19 pins
> +      - const: 1
> +        description: select #3, #4, #5 pins

'#' (with a space or newline before) is a comment, so these need to be
quoted. I only noticed because yamllint now requires a space after as
well:

./Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml:40:30:
[error] missing starting space in comment (comments)
./Documentation/devicetree/bindings/sound/asahi-kasei,ak4458.yaml:42:30:
[error] missing starting space in comment (comments)

Rob

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

end of thread, other threads:[~2023-04-06 13:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-28  9:18 [PATCH v5] ASoC: dt-bindings: ak4458: Convert to dtschema Saalim Quadri
2023-03-28 10:44 ` Krzysztof Kozlowski
2023-04-02 20:25   ` Saalim Quadri
2023-04-05 12:48 ` Mark Brown
2023-04-06 13:12 ` Rob Herring

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