From: Rob Herring <robh@kernel.org>
To: Xiaxi Shen <shenxiaxi26@gmail.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, lgirdwood@gmail.com,
broonie@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
javier.carrasco.cruz@gmail.com, skhan@linuxfoundation.org
Subject: Re: [PATCH v2] ASoC: dt-bindings: ssm2602: convert to dt schema
Date: Mon, 13 May 2024 14:42:25 -0500 [thread overview]
Message-ID: <20240513194225.GA3013979-robh@kernel.org> (raw)
In-Reply-To: <20240512002456.267057-1-shenxiaxi26@gmail.com>
On Sat, May 11, 2024 at 05:24:56PM -0700, Xiaxi Shen wrote:
> Convert adi,ssm2602 binding to DT schema
>
> The original adi,ssm2602.txt contains bindings for 3 devices
> SSM2602, SSM2603 and SSM2604. Since they share something
> in common. So I created one single yaml and name it 260x instead.
> Let me know if you think it should be done in another way.
>
> It passed dt_binding_check and dtbs_check.
>
> Signed-off-by: Xiaxi Shen <shenxiaxi26@gmail.com>
> ---
> Changes in v2:
> - Change '2602' to '260x' in the variable $id and
> it passed dt_binding_check and dtbs_check now.
>
> .../devicetree/bindings/sound/adi,ssm2602.txt | 19 -------
> .../bindings/sound/adi,ssm260x.yaml | 50 +++++++++++++++++++
> 2 files changed, 50 insertions(+), 19 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm2602.txt
> create mode 100644 Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/adi,ssm2602.txt b/Documentation/devicetree/bindings/sound/adi,ssm2602.txt
> deleted file mode 100644
> index 3b3302fe399b..000000000000
> --- a/Documentation/devicetree/bindings/sound/adi,ssm2602.txt
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices
> -
> -SSM2602 support both I2C and SPI as the configuration interface,
> -the selection is made by the MODE strap-in pin.
> -SSM2603 and SSM2604 only support I2C as the configuration interface.
> -
> -Required properties:
> -
> - - compatible : One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"
> -
> - - reg : the I2C address of the device for I2C, the chip select
> - number for SPI.
> -
> - Example:
> -
> - ssm2602: ssm2602@1a {
> - compatible = "adi,ssm2602";
> - reg = <0x1a>;
> - };
> diff --git a/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml b/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
> new file mode 100644
> index 000000000000..f465f9168a0a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/adi,ssm260x.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/adi,ssm260x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices
> +
> +description:
> + SSM2602 support both I2C and SPI as the configuration interface,
> +
Why the blank line?
> + the selection is made by the MODE strap-in pin.
> +
> + SSM2603 and SSM2604 only support I2C as the configuration interface.
> +
> +maintainers:
> + - Liam Girdwood <lgirdwood@gmail.com>
> + - Mark Brown <broonie@kernel.org>
> + - Rob Herring <robh@kernel.org>
> + - Krzysztof Kozlowski <krzk+dt@kernel.org>
> + - Conor Dooley <conor+dt@kernel.org>
> +
> +properties:
> + compatible:
> + description: One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"
Drop this. You say that with the schema below:
> + enum:
> + - adi,ssm2602
> + - adi,ssm2603
> + - adi,ssm2604
> +
> + reg:
> + description: the I2C address of the device for I2C, the chip select number for SPI.
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + ssm2602@1a {
> + compatible = "adi,ssm2602";
> + reg = <0x1a>;
> + };
> + };
> --
> 2.34.1
>
prev parent reply other threads:[~2024-05-13 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 0:24 [PATCH v2] ASoC: dt-bindings: ssm2602: convert to dt schema Xiaxi Shen
2024-05-13 19:42 ` Rob Herring [this message]
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=20240513194225.GA3013979-robh@kernel.org \
--to=robh@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=javier.carrasco.cruz@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=shenxiaxi26@gmail.com \
--cc=skhan@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.