devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Doug Brown <doug@schmorgal.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] ASoC: dt-bindings: add schema for WM8961
Date: Sun, 2 Oct 2022 10:06:31 +0200	[thread overview]
Message-ID: <dc2f73e4-5c8a-5018-f507-8e04d86fc6d5@linaro.org> (raw)
In-Reply-To: <20221001200039.21049-2-doug@schmorgal.com>

On 01/10/2022 22:00, Doug Brown wrote:
> Create a simple DT schema for the existing Wolfson WM8961 driver so that
> DT support can be added to the driver.
> 
> Signed-off-by: Doug Brown <doug@schmorgal.com>
> ---
>  .../devicetree/bindings/sound/wlf,wm8961.yaml | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8961.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
> new file mode 100644
> index 000000000000..73166cf0fdcf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/wlf,wm8961.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Wolfson WM8961 Ultra-Low Power Stereo CODEC
> +
> +maintainers:
> +  - patches@opensource.cirrus.com
> +
> +properties:
> +  '#sound-dai-cells':
> +    const: 0
> +
> +  compatible:
> +    const: wlf,wm8961

Please put compatible first in list of properties (and follow same order
in "required"). It's the most important piece, so we want it to be the
first to see. It also follows the convention of DTS, where compatible is
expected to be first.

> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - '#sound-dai-cells'
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          wm8961: codec@4a {
> +                  #sound-dai-cells = <0>;
> +                  compatible = "wlf,wm8961";

Here compatible first, reg second, then the rest.

> +                  reg = <0x4a>;
> +          };
> +    };

Best regards,
Krzysztof


  reply	other threads:[~2022-10-02  8:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01 20:00 [PATCH 0/2] ASoC: add devicetree support for WM8961 codec Doug Brown
2022-10-01 20:00 ` [PATCH 1/2] ASoC: dt-bindings: add schema for WM8961 Doug Brown
2022-10-02  8:06   ` Krzysztof Kozlowski [this message]
2022-10-01 20:00 ` [PATCH 2/2] ASoC: wm8961: add support for devicetree Doug Brown
2022-10-01 22:23   ` kernel test robot
2022-10-02  5:04     ` Doug Brown
2022-10-02  8:35       ` Krzysztof Kozlowski
2022-10-02 17:54         ` Doug Brown
2022-10-02  8:08   ` Krzysztof Kozlowski

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=dc2f73e4-5c8a-5018-f507-8e04d86fc6d5@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=doug@schmorgal.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    /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;
as well as URLs for NNTP newsgroup(s).