From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Vijaya Anand <sunrockers8@gmail.com>,
lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, alsa-devel@alsa-project.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Subject: Re: [RFC PATCH] ASoC: dt-bindings: adi,adau17x1: Convert to DT schema
Date: Sun, 12 Mar 2023 11:52:44 +0100 [thread overview]
Message-ID: <fa6bfc86-23a7-0a2c-8819-ca76d1086238@linaro.org> (raw)
In-Reply-To: <20230311200305.82087-1-sunrockers8@gmail.com>
On 11/03/2023 21:03, Vijaya Anand wrote:
> Convert the binding document for adi,adau17x1 from txt to yaml
> so one could validate dt-entries correctly and any future additions
> can go into yaml format. Add address and size cells to example to
> prevent errors regarding reg format.
>
> Signed-off-by: Vijaya Anand <sunrockers8@gmail.com>
> Cc: Daniel Baluta <daniel.baluta@nxp.com>
Thank you for your patch. There is something to discuss/improve.
> -Examples:
> -#include <dt-bindings/sound/adau17x1.h>
> -
> - i2c_bus {
> - adau1361@38 {
> - compatible = "adi,adau1761";
> - reg = <0x38>;
> -
> - clock-names = "mclk";
> - clocks = <&audio_clock>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/sound/adi,adau17x1.yaml b/Documentation/devicetree/bindings/sound/adi,adau17x1.yaml
> new file mode 100644
> index 000000000000..9c1dbf2b4e70
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/adi,adau17x1.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/adi,adau17x1.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices ADAU1361/ADAU1461/ADAU1761/ADAU1961/ADAU1381/ADAU1781
But what is this? Codec? Amplifier?
> +
> +maintainers:
> + - Lars-Peter Clausen <lars@metafoo.de>
> +
> +properties:
> + compatible:
> + enum:
> + - adi,adau1361
> + - adi,adau1461
> + - adi,adau1761
> + - adi,adau1961
> + - adi,adau1381
> + - adi,adau1781
Please put them in some order, e.g. alphabetical.
> +
> + reg:
> + maxItems: 1
> + description: The i2c address. Value depends on the state of ADDR0 and ADDR1, as wired in hardware.
This exceeds 80 characters (see coding style).
> +
> + clock-names:
> + const: mclk
> +
> + clocks:
> + maxItems: 1
> + description:
> + phandle + clock-specifiers for the clock that provides the audio master
> + clock for the device.
Drop "phandle + clock-specifiers for the " and make it simpler, just
items with description:
clocks
items:
- description: .......
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
Instead:
additionalProperties: false
Unless you plan to reference dai-common or component-common
> +
> +examples:
> + - |
> + i2c_bus {
i2c
> + #address-cells = <1>;
> + #size-cells = <0>;
> + adau1361@38 {
Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "adi,adau1761";
> + reg = <0x38>;
> + clock-names = "mclk";
> + clocks = <&audio_clock>;
Best regards,
Krzysztof
prev parent reply other threads:[~2023-03-12 10:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 20:03 Vijaya Anand
2023-03-12 10:52 ` Krzysztof Kozlowski [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=fa6bfc86-23a7-0a2c-8819-ca76d1086238@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sunrockers8@gmail.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
all inboxes | Powered by JetHome®