From: "Rafał Miłecki" <zajec5@gmail.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Rob Herring <robh@kernel.org>, Mark Brown <broonie@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Linux-DT <devicetree@vger.kernel.org>,
Linux-ALSA <alsa-devel@alsa-project.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH v3 2/2] ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 support
Date: Thu, 16 Mar 2023 15:28:07 +0100 [thread overview]
Message-ID: <b2810924-169d-0bad-8f20-6ec2e683d170@gmail.com> (raw)
In-Reply-To: <87sffa8g99.wl-kuninori.morimoto.gx@renesas.com>
On 13.02.2023 03:13, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> There are no compatible for "reg/reg-names" and "clock-name"
> between previous R-Car series and R-Car Gen4.
>
> "reg/reg-names" needs 3 categorize (for Gen1, for Gen2/Gen3, for Gen4),
> therefore, use 3 if-then to avoid nested if-then-else.
>
> Move "clock-name" detail properties to under allOf to use if-then-else
> for Gen4 or others.
Hi, this patch seems to add errors for me. Are my tools outdated or is
it a real issue? See below.
> Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#r
> Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#r
> Link: https://lore.kernel.org/all/87r0v1t02h.wl-kuninori.morimoto.gx@renesas.com/#r
> Link: https://lore.kernel.org/all/87y1p7bpma.wl-kuninori.morimoto.gx@renesas.com/#r
> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> .../bindings/sound/renesas,rsnd.yaml | 76 ++++++++++++++++---
> 1 file changed, 64 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> index 12ccf29338d9..55e5213b90a1 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> @@ -101,17 +101,7 @@ properties:
>
> clock-names:
> description: List of necessary clock names.
> - minItems: 1
> - maxItems: 31
> - items:
> - oneOf:
> - - const: ssi-all
> - - pattern: '^ssi\.[0-9]$'
> - - pattern: '^src\.[0-9]$'
> - - pattern: '^mix\.[0-1]$'
> - - pattern: '^ctu\.[0-1]$'
> - - pattern: '^dvc\.[0-1]$'
> - - pattern: '^clk_(a|b|c|i)$'
> + # details are defined below
>
> ports:
> $ref: audio-graph-port.yaml#/definitions/port-base
> @@ -288,6 +278,11 @@ required:
>
> allOf:
> - $ref: dai-common.yaml#
> +
> + #--------------------
> + # reg/reg-names
> + #--------------------
> + # for Gen1
This seems to cause:
./Documentation/devicetree/bindings/sound/renesas,rsnd.yaml:282:4: [error] missing starting space in comment (comments)
./Documentation/devicetree/bindings/sound/renesas,rsnd.yaml:284:4: [error] missing starting space in comment (comments)
./Documentation/devicetree/bindings/sound/renesas,rsnd.yaml:339:4: [error] missing starting space in comment (comments)
./Documentation/devicetree/bindings/sound/renesas,rsnd.yaml:341:4: [error] missing starting space in comment (comments)
> - if:
> properties:
> compatible:
> @@ -303,7 +298,15 @@ allOf:
> - scu
> - ssi
> - adg
> - else:
> + # for Gen2/Gen3
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,rcar_sound-gen2
> + - renesas,rcar_sound-gen3
> + then:
> properties:
> reg:
> minItems: 5
> @@ -315,6 +318,55 @@ allOf:
> - ssiu
> - ssi
> - audmapp
> + # for Gen4
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,rcar_sound-gen4
> + then:
> + properties:
> + reg:
> + maxItems: 4
> + reg-names:
> + items:
> + enum:
> + - adg
> + - ssiu
> + - ssi
> + - sdmc
> +
> + #--------------------
> + # clock-names
> + #--------------------
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,rcar_sound-gen4
> + then:
> + properties:
> + clock-names:
> + maxItems: 3
> + items:
> + enum:
> + - ssi.0
> + - ssiu.0
> + - clkin
> + else:
> + properties:
> + clock-names:
> + minItems: 1
> + maxItems: 31
> + items:
> + oneOf:
> + - const: ssi-all
> + - pattern: '^ssi\.[0-9]$'
> + - pattern: '^src\.[0-9]$'
> + - pattern: '^mix\.[0-1]$'
> + - pattern: '^ctu\.[0-1]$'
> + - pattern: '^dvc\.[0-1]$'
> + - pattern: '^clk_(a|b|c|i)$'
>
> unevaluatedProperties: false
>
next prev parent reply other threads:[~2023-03-16 14:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 2:12 [PATCH v3 0/2] ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 support Kuninori Morimoto
2023-02-13 2:13 ` [PATCH v3 2/2] " Kuninori Morimoto
2023-02-13 8:58 ` Krzysztof Kozlowski
2023-02-14 17:52 ` Mark Brown
2023-02-15 18:42 ` Krzysztof Kozlowski
2023-02-16 1:09 ` Kuninori Morimoto
2023-02-16 7:49 ` Krzysztof Kozlowski
2023-02-17 1:09 ` Kuninori Morimoto
2023-03-16 14:28 ` Rafał Miłecki [this message]
2023-03-16 23:44 ` Kuninori Morimoto
2023-03-17 8:19 ` Krzysztof Kozlowski
2023-02-13 2:13 ` [PATCH v3 1/2] ASoC: dt-bindings: renesas,rsnd.yaml: drop "dmas/dma-names" from "rcar_sound,ssi" Kuninori Morimoto
2023-02-13 8:56 ` Krzysztof Kozlowski
2023-02-13 8:56 ` Geert Uytterhoeven
2023-02-13 8:56 ` Krzysztof Kozlowski
2023-02-13 23:21 ` Kuninori Morimoto
2023-02-14 22:54 ` (subset) [PATCH v3 0/2] ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 support Mark Brown
2023-03-06 13:32 ` Mark Brown
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=b2810924-169d-0bad-8f20-6ec2e683d170@gmail.com \
--to=zajec5@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).