clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml
Subsystems (3)
v2 cover clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml
It was then adjusted based on the following patch series:
[1] https://lore.kernel.org/r/[email protected]/
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
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3
PATCH v2 1/2 ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
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.
--- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 1 - 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +0 -1
@@ -258,7 +258,6 @@ required: - "#sound-dai-cells" allOf: - - $ref: audio-graph.yaml# - if: properties: compatible:
Signature · 1 line
1.8.3
PATCH v2 2/2 ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
In reply to Zhen LeiCurrently, 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$', ...
--- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +5 -0
@@ -115,6 +115,11 @@ properties: $ref: audio-graph-port.yaml# unevaluatedProperties: false + ports: + patternProperties: + '^port@[0-9]': + $ref: "#/properties/port" + # use patternProperties to avoid naming "xxx,yyy" issue patternProperties: "^rcar_sound,dvc$":
Signature · 1 line
1.8.3
Rob Herring
maintainerRe: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
Quoted 3 lines · Zhen Lei
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".
A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity.
Quoted 15 lines
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$', ...Signed-off-by Zhen Lei <[email protected]>--- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +0
-0
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml properties: · line 118
Quoted 4 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-0@@ -115,6 +115,11 @@ properties: $ref: audio-graph-port.yaml# unevaluatedProperties: false + ports:
$ref: /schemas/graph.yaml#/properties/ports
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml properties: · line 121
Quoted 3 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +3
-0+ patternProperties: + '^port@[0-9]': + $ref: "#/properties/port"
Then this should be: $ref: audio-graph-port.yaml#
Also, what each port is should be defined, but that's a separate problem.
Quoted 8 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-0+ # use patternProperties to avoid naming "xxx,yyy" issue patternProperties: "^rcar_sound,dvc$":Signature · 1 line
1.8.3
Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
Quoted 7 lines · Rob Herring
Quoted 3 lines · Zhen Lei
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".A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity.
Right, I'll adjust this patch again.
Quoted 19 lines
Quoted 19 lines
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$', ...Signed-off-by Zhen Lei <[email protected]>--- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +0
-0@@ -115,6 +115,11 @@ properties: $ref: audio-graph-port.yaml# unevaluatedProperties: false
Quoted 3 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml properties: · line 118
Quoted 1 line
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-0+ ports:$ref: /schemas/graph.yaml#/properties/ports
OK, thanks
Quoted 6 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml properties: · line 121
Quoted 4 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +3
-0+ patternProperties: + '^port@[0-9]': + $ref: "#/properties/port"Then this should be: $ref: audio-graph-port.yaml#
OK, thanks
Quoted 15 lines
Also, what each port is should be defined, but that's a separate problem.
Quoted 8 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-0+ # use patternProperties to avoid naming "xxx,yyy" issue patternProperties: "^rcar_sound,dvc$":Signature · 1 line
1.8.3.
Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
Quoted 10 lines · Leizhen (ThunderTown)
Quoted 7 lines · Rob Herring
Quoted 3 lines · Zhen Lei
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".A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity.
Hi Rob:
I don't think of a good way to avoid "port" and "ports" to be used at the same time. Should I disable the use of "port"? Convert the two usages of "port" into "ports". But usually no one will use both of them in one dts file. And even if it's used at the same time, it's not a big mistake. So I decided not to test it.
Quoted 52 lines
Right, I'll adjust this patch again.
Quoted 19 lines
Quoted 19 lines
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$', ...Signed-off-by Zhen Lei <[email protected]>--- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +0
-0@@ -115,6 +115,11 @@ properties: $ref: audio-graph-port.yaml# unevaluatedProperties: falseQuoted 3 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml properties: · line 118
Quoted 1 line
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-0+ ports:$ref: /schemas/graph.yaml#/properties/ports
OK, thanks
Quoted 6 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml properties: · line 121
Quoted 4 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +3
-0+ patternProperties: + '^port@[0-9]': + $ref: "#/properties/port"Then this should be: $ref: audio-graph-port.yaml#
OK, thanks
Quoted 15 lines
Also, what each port is should be defined, but that's a separate problem.
Quoted 8 lines
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-0+ # use patternProperties to avoid naming "xxx,yyy" issue patternProperties: "^rcar_sound,dvc$":Signature · 1 line
1.8.3.
Rob Herring
maintainerRe: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
Quoted 11 lines · Leizhen (ThunderTown)
Quoted 8 lines · Leizhen (ThunderTown)
Quoted 5 lines · Rob Herring
Quoted 3 lines · Zhen Lei
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".
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity.
Hi Rob:
I don't think of a good way to avoid "port" and "ports" to be used at the same time. Should I disable the use of "port"? Convert the two usages of "port" into "ports". But usually no one will use both of them in one dts file. And even if it's used at the same time, it's not a big mistake. So I decided not to test it.
I think the Renesas folks need to comment on this.
Rob
Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
Quoted 15 lines · Rob Herring
Quoted 14 lines · Leizhen (ThunderTown)
Quoted 10 lines · Leizhen (ThunderTown)
Quoted 7 lines · Rob Herring
Quoted 3 lines · Zhen Lei
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".A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity.
Quoted 7 lines
Quoted 5 lines
Hi Rob:
I don't think of a good way to avoid "port" and "ports" to be used at the same time. Should I disable the use of "port"? Convert the two usages of "port" into "ports". But usually no one will use both of them in one dts file. And even if it's used at the same time, it's not a big mistake. So I decided not to test it.I think the Renesas folks need to comment on this.
Hi All:
I've figured out a way to avoid both. I'll send v3 right away.
Quoted 5 lines
Rob
.