From: Rob Herring <robh@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Linux-ALSA <alsa-devel@alsa-project.org>,
devicetree@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports
Date: Tue, 17 Jan 2023 11:04:39 -0600 [thread overview]
Message-ID: <20230117170439.GA3225212-robh@kernel.org> (raw)
In-Reply-To: <87zgapho68.wl-kuninori.morimoto.gx@renesas.com>
On Wed, Jan 11, 2023 at 01:09:52AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Audio Graph user needs "ports" not only "port".
> This patch adds standard "ports" as definitions to use it easily.
>
> If user needs standard "ports", it can use
>
> ports:
> $ref: audio-graph-port.yaml#/definitions/ports
>
> If user want to use custom ports, it can re-use
> audio-graph-port.yaml#/definitions/port-base"
> audio-graph-port.yaml#/definitions/endpoint-base"
>
> https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> .../devicetree/bindings/sound/audio-graph-port.yaml | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> index fa66b73abcaf2..6fcf7f567424d 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> @@ -97,6 +97,18 @@ definitions:
> minimum: 1
> maximum: 64
>
> + ports:
> + $ref: "#/definitions/port-base"
This applies to 'port' nodes, but this is the 'ports' node.
For example, this schema says you can have endpoint nodes directly under
'ports' which is not valid.
But why do you need this? The graph.yaml schema should be sufficient
because you aren't adding custom properties in 'ports'. BTW, the
preference is to only add properties in 'endpoint' nodes.
> + unevaluatedProperties: false
> + patternProperties:
> + "^port(@[0-9a-f]+)?$":
> + $ref: "#/definitions/port-base"
> + unevaluatedProperties: false
If 'ports' schema is applied to a DT, then its 'port' node(s) cannot
have any additional properties. That defeats the point of patch 1.
You cannot have 2 schemas with child nodes and be able to extend the
properties on the child nodes. The 2 child node schemas can't 'see' each
other in that case. In these cases, the base child node schema has to be
referenced directly by the extended child node schema.
> + patternProperties:
> + "^endpoint(@[0-9a-f]+)?":
> + $ref: "#/definitions/endpoint-base"
> + unevaluatedProperties: false
The same thing applies here.
Rob
next prev parent reply other threads:[~2023-01-17 17:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 1:07 [PATCH v2 00/10] ASoC: dt-bindings: audio-graph-port related update Kuninori Morimoto
2023-01-11 1:08 ` [PATCH v2 01/10] ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint Kuninori Morimoto
2023-01-11 1:09 ` [PATCH v2 02/10] ASoC: dt-bindings: audio-graph-port: add definitions/ports Kuninori Morimoto
2023-01-17 17:04 ` Rob Herring [this message]
2023-01-18 0:08 ` Kuninori Morimoto
2023-01-11 1:10 ` [PATCH v2 03/10] ASoC: dt-bindings: audio-graph-port: add missing mclk-fs Kuninori Morimoto
2023-01-17 17:09 ` Rob Herring
2023-01-11 1:10 ` [PATCH v2 04/10] ASoC: dt-bindings: audio-graph-port: add clocks on endpoint Kuninori Morimoto
2023-01-11 1:11 ` [PATCH v2 05/10] ASoC: dt-bindings: audio-graph-port: remove prefix Kuninori Morimoto
2023-01-17 17:11 ` Rob Herring
2023-01-11 1:11 ` [PATCH v2 06/10] ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema Kuninori Morimoto
2023-01-17 17:12 ` Rob Herring
2023-01-11 1:11 ` [PATCH v2 07/10] ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style Kuninori Morimoto
2023-01-11 1:12 ` [PATCH v2 08/10] ASoC: dt-bindings: renesas,rsnd: add missing playback/capture Kuninori Morimoto
2023-01-11 13:29 ` Rob Herring
2023-01-12 0:58 ` Kuninori Morimoto
2023-01-11 1:12 ` [PATCH v2 09/10] ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory Kuninori Morimoto
2023-01-11 1:12 ` [PATCH v2 10/10] ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells Kuninori Morimoto
2023-01-12 1:01 ` [PATCH 11/10] ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src Kuninori Morimoto
2023-01-12 12:22 ` Rob Herring
2023-01-12 22:53 ` Kuninori Morimoto
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=20230117170439.GA3225212-robh@kernel.org \
--to=robh@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuninori.morimoto.gx@renesas.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).