* [PATCH v3 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml
@ 2021-04-12 10:06 Zhen Lei
2021-04-12 10:06 ` [PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property Zhen Lei
2021-04-12 10:06 ` [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Zhen Lei
0 siblings, 2 replies; 5+ messages in thread
From: Zhen Lei @ 2021-04-12 10:06 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree,
linux-kernel
Cc: Zhen Lei, Kuninori Morimoto
v2 --> v3:
Modified based on Rob's review comments. For example, "ports" and "port" are
not allowed at the same time.
For the details, please refer:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2539753.html
v1 --> v2:
The analysis was not clear in the previous version, "$ref: audio-graph.yaml#"
is not required.
It was then adjusted based on the following patch series:
[1] https://lore.kernel.org/r/20210323163634.877511-1-robh@kernel.org/
v1:
When I do dt_binding_check for all YAML files, below warning is reported:
/root/mainline/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dt.yaml: sound@ec500000: 'dais' is a required property
From schema: /root/mainline/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
make dt_binding_check -j24 2>err.txt
Before:
cat err.txt | wc -l
2
After:
cat err.txt | wc -l
0
make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/renesas,rsnd.yaml -j24 2>err.txt
Before:
cat err.txt | wc -l
130
After:
cat err.txt | wc -l
0
Zhen Lei (2):
ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required
property
ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match
any of the regexes
.../devicetree/bindings/sound/renesas,rsnd.yaml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--
2.26.0.106.g9fadedd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
2021-04-12 10:06 [PATCH v3 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei
@ 2021-04-12 10:06 ` Zhen Lei
2021-04-15 20:36 ` Rob Herring
2021-04-12 10:06 ` [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Zhen Lei
1 sibling, 1 reply; 5+ messages in thread
From: Zhen Lei @ 2021-04-12 10:06 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree,
linux-kernel
Cc: Zhen Lei, Kuninori Morimoto
When I do dt_binding_check, below warning is reported:
Documentation/devicetree/bindings/sound/renesas,rsnd.example.dt.yaml: \
sound@ec500000: 'dais' is a required property
I looked at all the dts files in the "arch/arm64/boot/dts/renesas/"
directory. However, the dts node of this driver does not reference any
property in file audio-graph.yaml. This can be proved to be true, because
after I deleted "$ref: audio-graph.yaml#", the old 'dais' warnings are
cleared, and no new warning are generated.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 1e0e14e889133b8..384191ee497f534 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -258,7 +258,6 @@ required:
- "#sound-dai-cells"
allOf:
- - $ref: audio-graph.yaml#
- if:
properties:
compatible:
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
2021-04-12 10:06 [PATCH v3 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei
2021-04-12 10:06 ` [PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property Zhen Lei
@ 2021-04-12 10:06 ` Zhen Lei
2021-04-15 20:36 ` Rob Herring
1 sibling, 1 reply; 5+ messages in thread
From: Zhen Lei @ 2021-04-12 10:06 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree,
linux-kernel
Cc: Zhen Lei, Kuninori Morimoto
Currently, if there are more than two ports, or if there is only one port
but other properties(such as "#address-cells") is required, these ports
are placed under the "ports" node. So add the schema of property "ports".
Otherwise, warnings similar to the following will be reported:
arch/arm64/boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dt.yaml: \
sound@ec500000: 'ports' does not match any of the regexes: \
'^rcar_sound,ctu$', '^rcar_sound,dai$', '^rcar_sound,dvc$', ...
A given binding should just use 'ports' or 'port' depending on it's need.
Both are not allowed at the same time. The check is done in "allOf".
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
.../devicetree/bindings/sound/renesas,rsnd.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 384191ee497f534..32b10fc3789eeac 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -115,6 +115,12 @@ properties:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ patternProperties:
+ '^port@[0-9]':
+ $ref: audio-graph-port.yaml#
+
# use patternProperties to avoid naming "xxx,yyy" issue
patternProperties:
"^rcar_sound,dvc$":
@@ -258,6 +264,12 @@ required:
- "#sound-dai-cells"
allOf:
+ - if:
+ required:
+ - ports
+ then:
+ properties:
+ port: false
- if:
properties:
compatible:
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
2021-04-12 10:06 ` [PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property Zhen Lei
@ 2021-04-15 20:36 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-04-15 20:36 UTC (permalink / raw)
To: Zhen Lei
Cc: Liam Girdwood, linux-kernel, devicetree, Rob Herring,
Kuninori Morimoto, alsa-devel, Mark Brown
On Mon, 12 Apr 2021 18:06:37 +0800, Zhen Lei wrote:
> When I do dt_binding_check, below warning is reported:
> Documentation/devicetree/bindings/sound/renesas,rsnd.example.dt.yaml: \
> sound@ec500000: 'dais' is a required property
>
> I looked at all the dts files in the "arch/arm64/boot/dts/renesas/"
> directory. However, the dts node of this driver does not reference any
> property in file audio-graph.yaml. This can be proved to be true, because
> after I deleted "$ref: audio-graph.yaml#", the old 'dais' warnings are
> cleared, and no new warning are generated.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 1 -
> 1 file changed, 1 deletion(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
2021-04-12 10:06 ` [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Zhen Lei
@ 2021-04-15 20:36 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-04-15 20:36 UTC (permalink / raw)
To: Zhen Lei
Cc: linux-kernel, Liam Girdwood, Rob Herring, Mark Brown, devicetree,
Kuninori Morimoto, alsa-devel
On Mon, 12 Apr 2021 18:06:38 +0800, Zhen Lei wrote:
> Currently, if there are more than two ports, or if there is only one port
> but other properties(such as "#address-cells") is required, these ports
> are placed under the "ports" node. So add the schema of property "ports".
>
> Otherwise, warnings similar to the following will be reported:
> arch/arm64/boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dt.yaml: \
> sound@ec500000: 'ports' does not match any of the regexes: \
> '^rcar_sound,ctu$', '^rcar_sound,dai$', '^rcar_sound,dvc$', ...
>
> A given binding should just use 'ports' or 'port' depending on it's need.
> Both are not allowed at the same time. The check is done in "allOf".
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> .../devicetree/bindings/sound/renesas,rsnd.yaml | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-15 20:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 10:06 [PATCH v3 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei
2021-04-12 10:06 ` [PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property Zhen Lei
2021-04-15 20:36 ` Rob Herring
2021-04-12 10:06 ` [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Zhen Lei
2021-04-15 20:36 ` Rob Herring
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).