public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Cc: Mark Brown <broonie@kernel.org>,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: sound: convert ROHM BD28623 amplifier binding to yaml
Date: Mon, 20 Jul 2020 20:12:11 -0600	[thread overview]
Message-ID: <20200721021211.GA3388250@bogus> (raw)
In-Reply-To: <20200714081000.177914-1-katsuhiro@katsuster.net>

On Tue, Jul 14, 2020 at 05:09:59PM +0900, Katsuhiro Suzuki wrote:
> This patch converts ROHM BD28623UMV class D speaker amplifier binding
> to DT schema.
> 
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> ---
>  .../bindings/sound/rohm,bd28623.txt           | 29 ---------
>  .../bindings/sound/rohm,bd28623.yaml          | 65 +++++++++++++++++++
>  2 files changed, 65 insertions(+), 29 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/rohm,bd28623.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/rohm,bd28623.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/rohm,bd28623.txt b/Documentation/devicetree/bindings/sound/rohm,bd28623.txt
> deleted file mode 100644
> index d84557c2686e..000000000000
> --- a/Documentation/devicetree/bindings/sound/rohm,bd28623.txt
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -ROHM BD28623MUV Class D speaker amplifier for digital input
> -
> -This codec does not have any control buses such as I2C, it detect format and
> -rate of I2S signal automatically. It has two signals that can be connected
> -to GPIOs: reset and mute.
> -
> -Required properties:
> -- compatible      : should be "rohm,bd28623"
> -- #sound-dai-cells: should be 0.
> -- VCCA-supply     : regulator phandle for the VCCA supply
> -- VCCP1-supply    : regulator phandle for the VCCP1 supply
> -- VCCP2-supply    : regulator phandle for the VCCP2 supply
> -
> -Optional properties:
> -- reset-gpios     : GPIO specifier for the active low reset line
> -- mute-gpios      : GPIO specifier for the active low mute line
> -
> -Example:
> -
> -	codec {
> -		compatible = "rohm,bd28623";
> -		#sound-dai-cells = <0>;
> -
> -		VCCA-supply = <&vcc_reg>;
> -		VCCP1-supply = <&vcc_reg>;
> -		VCCP2-supply = <&vcc_reg>;
> -		reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
> -		mute-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
> -	};
> diff --git a/Documentation/devicetree/bindings/sound/rohm,bd28623.yaml b/Documentation/devicetree/bindings/sound/rohm,bd28623.yaml
> new file mode 100644
> index 000000000000..acd8609252b4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/rohm,bd28623.yaml
> @@ -0,0 +1,65 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/rohm,bd28623.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ROHM BD28623MUV Class D speaker amplifier for digital input
> +
> +description:
> +  This codec does not have any control buses such as I2C, it detect
> +  format and rate of I2S signal automatically. It has two signals
> +  that can be connected to GPIOs reset and mute.
> +
> +maintainers:
> +  - Katsuhiro Suzuki <katsuhiro@katsuster.net>
> +
> +properties:
> +  compatible:
> +    const: rohm,bd28623
> +
> +  "#sound-dai-cells":
> +    const: 0
> +
> +  VCCA-supply:
> +    description:
> +      regulator phandle for the VCCA (for analog) power supply
> +
> +  VCCP1-supply:
> +    description:
> +      regulator phandle for the VCCP1 (for ch1) power supply
> +
> +  VCCP2-supply:
> +    description:
> +      regulator phandle for the VCCP2 (for ch2) power supply
> +
> +  reset-gpios:
> +    maxItems: 1
> +    description:
> +      GPIO specifier for the active low reset line
> +
> +  mute-gpios:
> +    maxItems: 1
> +    description:
> +      GPIO specifier for the active low mute line
> +
> +required:
> +  - compatible
> +  - VCCA-supply
> +  - VCCP1-supply
> +  - VCCP2-supply
> +  - "#sound-dai-cells"

Needs an:

additionalProperties: false

With that,

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

> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    codec {
> +      compatible = "rohm,bd28623";
> +      #sound-dai-cells = <0>;
> +
> +      VCCA-supply = <&vcc_reg>;
> +      VCCP1-supply = <&vcc_reg>;
> +      VCCP2-supply = <&vcc_reg>;
> +      reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
> +      mute-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
> +    };
> -- 
> 2.27.0
> 

  reply	other threads:[~2020-07-21  2:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  8:09 [PATCH] dt-bindings: sound: convert ROHM BD28623 amplifier binding to yaml Katsuhiro Suzuki
2020-07-21  2:12 ` Rob Herring [this message]
2020-07-22 18:07   ` Katsuhiro Suzuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721021211.GA3388250@bogus \
    --to=robh@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=katsuhiro@katsuster.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox