* [PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml @ 2021-03-31 9:16 ` Zhen Lei 0 siblings, 0 replies; 16+ messages in thread From: Zhen Lei @ 2021-03-31 9:16 UTC (permalink / raw) To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree, linux-kernel Cc: Zhen Lei, Kuninori Morimoto 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 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 1.8.3 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas, rsnd.yaml @ 2021-03-31 9:16 ` Zhen Lei 0 siblings, 0 replies; 16+ messages in thread From: Zhen Lei @ 2021-03-31 9:16 UTC (permalink / raw) To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree, linux-kernel Cc: Kuninori Morimoto, Zhen Lei 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 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 1.8.3 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property 2021-03-31 9:16 ` [PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas, rsnd.yaml Zhen Lei @ 2021-03-31 9:16 ` Zhen Lei -1 siblings, 0 replies; 16+ messages in thread From: Zhen Lei @ 2021-03-31 9:16 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: -- 1.8.3 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property @ 2021-03-31 9:16 ` Zhen Lei 0 siblings, 0 replies; 16+ messages in thread From: Zhen Lei @ 2021-03-31 9:16 UTC (permalink / raw) To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree, linux-kernel Cc: Kuninori Morimoto, Zhen Lei 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: -- 1.8.3 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes 2021-03-31 9:16 ` [PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas, rsnd.yaml Zhen Lei @ 2021-03-31 9:16 ` Zhen Lei -1 siblings, 0 replies; 16+ messages in thread From: Zhen Lei @ 2021-03-31 9:16 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$', ... Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index 384191ee497f534..a42992fa687d3f3 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -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$": -- 1.8.3 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes @ 2021-03-31 9:16 ` Zhen Lei 0 siblings, 0 replies; 16+ messages in thread From: Zhen Lei @ 2021-03-31 9:16 UTC (permalink / raw) To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree, linux-kernel Cc: Kuninori Morimoto, 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". 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 <thunder.leizhen@huawei.com> --- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index 384191ee497f534..a42992fa687d3f3 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -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$": -- 1.8.3 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes 2021-03-31 9:16 ` Zhen Lei @ 2021-04-01 20:20 ` Rob Herring -1 siblings, 0 replies; 16+ messages in thread From: Rob Herring @ 2021-04-01 20:20 UTC (permalink / raw) To: Zhen Lei Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel, Kuninori Morimoto On Wed, Mar 31, 2021 at 05:16:16PM +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". A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity. > 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 <thunder.leizhen@huawei.com> > --- > Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml > index 384191ee497f534..a42992fa687d3f3 100644 > --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml > +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml > @@ -115,6 +115,11 @@ properties: > $ref: audio-graph-port.yaml# > unevaluatedProperties: false > > + ports: $ref: /schemas/graph.yaml#/properties/ports > + 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. > + > # use patternProperties to avoid naming "xxx,yyy" issue > patternProperties: > "^rcar_sound,dvc$": > -- > 1.8.3 > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes @ 2021-04-01 20:20 ` Rob Herring 0 siblings, 0 replies; 16+ messages in thread From: Rob Herring @ 2021-04-01 20:20 UTC (permalink / raw) To: Zhen Lei Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood, linux-kernel, Mark Brown On Wed, Mar 31, 2021 at 05:16:16PM +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". A given binding should just use 'ports' or 'port' depending on it's need. Supporting both forms is needless complexity. > 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 <thunder.leizhen@huawei.com> > --- > Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml > index 384191ee497f534..a42992fa687d3f3 100644 > --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml > +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml > @@ -115,6 +115,11 @@ properties: > $ref: audio-graph-port.yaml# > unevaluatedProperties: false > > + ports: $ref: /schemas/graph.yaml#/properties/ports > + 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. > + > # use patternProperties to avoid naming "xxx,yyy" issue > patternProperties: > "^rcar_sound,dvc$": > -- > 1.8.3 > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes 2021-04-01 20:20 ` Rob Herring @ 2021-04-07 2:04 ` Leizhen (ThunderTown) -1 siblings, 0 replies; 16+ messages in thread From: Leizhen (ThunderTown) @ 2021-04-07 2:04 UTC (permalink / raw) To: Rob Herring Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel, Kuninori Morimoto On 2021/4/2 4:20, Rob Herring wrote: > On Wed, Mar 31, 2021 at 05:16:16PM +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". > > 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. > >> 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 <thunder.leizhen@huawei.com> >> --- >> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >> index 384191ee497f534..a42992fa687d3f3 100644 >> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >> @@ -115,6 +115,11 @@ properties: >> $ref: audio-graph-port.yaml# >> unevaluatedProperties: false >> >> + ports: > > $ref: /schemas/graph.yaml#/properties/ports OK, thanks > >> + patternProperties: >> + '^port@[0-9]': >> + $ref: "#/properties/port" > > Then this should be: $ref: audio-graph-port.yaml# OK, thanks > > Also, what each port is should be defined, but that's a separate > problem. > >> + >> # use patternProperties to avoid naming "xxx,yyy" issue >> patternProperties: >> "^rcar_sound,dvc$": >> -- >> 1.8.3 >> >> > > . > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes @ 2021-04-07 2:04 ` Leizhen (ThunderTown) 0 siblings, 0 replies; 16+ messages in thread From: Leizhen (ThunderTown) @ 2021-04-07 2:04 UTC (permalink / raw) To: Rob Herring Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood, linux-kernel, Mark Brown On 2021/4/2 4:20, Rob Herring wrote: > On Wed, Mar 31, 2021 at 05:16:16PM +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". > > 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. > >> 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 <thunder.leizhen@huawei.com> >> --- >> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >> index 384191ee497f534..a42992fa687d3f3 100644 >> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >> @@ -115,6 +115,11 @@ properties: >> $ref: audio-graph-port.yaml# >> unevaluatedProperties: false >> >> + ports: > > $ref: /schemas/graph.yaml#/properties/ports OK, thanks > >> + patternProperties: >> + '^port@[0-9]': >> + $ref: "#/properties/port" > > Then this should be: $ref: audio-graph-port.yaml# OK, thanks > > Also, what each port is should be defined, but that's a separate > problem. > >> + >> # use patternProperties to avoid naming "xxx,yyy" issue >> patternProperties: >> "^rcar_sound,dvc$": >> -- >> 1.8.3 >> >> > > . > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes 2021-04-07 2:04 ` Leizhen (ThunderTown) @ 2021-04-08 12:28 ` Leizhen (ThunderTown) -1 siblings, 0 replies; 16+ messages in thread From: Leizhen (ThunderTown) @ 2021-04-08 12:28 UTC (permalink / raw) To: Rob Herring Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel, Kuninori Morimoto On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: > > > On 2021/4/2 4:20, Rob Herring wrote: >> On Wed, Mar 31, 2021 at 05:16:16PM +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". >> >> 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. > > Right, I'll adjust this patch again. > >> >>> 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 <thunder.leizhen@huawei.com> >>> --- >>> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> index 384191ee497f534..a42992fa687d3f3 100644 >>> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> @@ -115,6 +115,11 @@ properties: >>> $ref: audio-graph-port.yaml# >>> unevaluatedProperties: false >>> >>> + ports: >> >> $ref: /schemas/graph.yaml#/properties/ports > > OK, thanks > >> >>> + patternProperties: >>> + '^port@[0-9]': >>> + $ref: "#/properties/port" >> >> Then this should be: $ref: audio-graph-port.yaml# > > OK, thanks > >> >> Also, what each port is should be defined, but that's a separate >> problem. >> >>> + >>> # use patternProperties to avoid naming "xxx,yyy" issue >>> patternProperties: >>> "^rcar_sound,dvc$": >>> -- >>> 1.8.3 >>> >>> >> >> . >> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes @ 2021-04-08 12:28 ` Leizhen (ThunderTown) 0 siblings, 0 replies; 16+ messages in thread From: Leizhen (ThunderTown) @ 2021-04-08 12:28 UTC (permalink / raw) To: Rob Herring Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood, linux-kernel, Mark Brown On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: > > > On 2021/4/2 4:20, Rob Herring wrote: >> On Wed, Mar 31, 2021 at 05:16:16PM +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". >> >> 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. > > Right, I'll adjust this patch again. > >> >>> 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 <thunder.leizhen@huawei.com> >>> --- >>> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> index 384191ee497f534..a42992fa687d3f3 100644 >>> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> @@ -115,6 +115,11 @@ properties: >>> $ref: audio-graph-port.yaml# >>> unevaluatedProperties: false >>> >>> + ports: >> >> $ref: /schemas/graph.yaml#/properties/ports > > OK, thanks > >> >>> + patternProperties: >>> + '^port@[0-9]': >>> + $ref: "#/properties/port" >> >> Then this should be: $ref: audio-graph-port.yaml# > > OK, thanks > >> >> Also, what each port is should be defined, but that's a separate >> problem. >> >>> + >>> # use patternProperties to avoid naming "xxx,yyy" issue >>> patternProperties: >>> "^rcar_sound,dvc$": >>> -- >>> 1.8.3 >>> >>> >> >> . >> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes 2021-04-08 12:28 ` Leizhen (ThunderTown) @ 2021-04-08 20:42 ` Rob Herring -1 siblings, 0 replies; 16+ messages in thread From: Rob Herring @ 2021-04-08 20:42 UTC (permalink / raw) To: Leizhen (ThunderTown) Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel, Kuninori Morimoto On Thu, Apr 08, 2021 at 08:28:08PM +0800, Leizhen (ThunderTown) wrote: > > > On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: > > > > > > On 2021/4/2 4:20, Rob Herring wrote: > >> On Wed, Mar 31, 2021 at 05:16:16PM +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". > >> > >> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes @ 2021-04-08 20:42 ` Rob Herring 0 siblings, 0 replies; 16+ messages in thread From: Rob Herring @ 2021-04-08 20:42 UTC (permalink / raw) To: Leizhen (ThunderTown) Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood, linux-kernel, Mark Brown On Thu, Apr 08, 2021 at 08:28:08PM +0800, Leizhen (ThunderTown) wrote: > > > On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: > > > > > > On 2021/4/2 4:20, Rob Herring wrote: > >> On Wed, Mar 31, 2021 at 05:16:16PM +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". > >> > >> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes 2021-04-08 20:42 ` Rob Herring @ 2021-04-12 6:45 ` Leizhen (ThunderTown) -1 siblings, 0 replies; 16+ messages in thread From: Leizhen (ThunderTown) @ 2021-04-12 6:45 UTC (permalink / raw) To: Rob Herring Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel, Kuninori Morimoto On 2021/4/9 4:42, Rob Herring wrote: > On Thu, Apr 08, 2021 at 08:28:08PM +0800, Leizhen (ThunderTown) wrote: >> >> >> On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: >>> >>> >>> On 2021/4/2 4:20, Rob Herring wrote: >>>> On Wed, Mar 31, 2021 at 05:16:16PM +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". >>>> >>>> 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. Hi All: I've figured out a way to avoid both. I'll send v3 right away. > > Rob > > . > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes @ 2021-04-12 6:45 ` Leizhen (ThunderTown) 0 siblings, 0 replies; 16+ messages in thread From: Leizhen (ThunderTown) @ 2021-04-12 6:45 UTC (permalink / raw) To: Rob Herring Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood, linux-kernel, Mark Brown On 2021/4/9 4:42, Rob Herring wrote: > On Thu, Apr 08, 2021 at 08:28:08PM +0800, Leizhen (ThunderTown) wrote: >> >> >> On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: >>> >>> >>> On 2021/4/2 4:20, Rob Herring wrote: >>>> On Wed, Mar 31, 2021 at 05:16:16PM +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". >>>> >>>> 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. Hi All: I've figured out a way to avoid both. I'll send v3 right away. > > Rob > > . > ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2021-04-12 6:46 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-31 9:16 [PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei 2021-03-31 9:16 ` [PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas, rsnd.yaml Zhen Lei 2021-03-31 9:16 ` [PATCH v2 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property Zhen Lei 2021-03-31 9:16 ` Zhen Lei 2021-03-31 9:16 ` [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Zhen Lei 2021-03-31 9:16 ` Zhen Lei 2021-04-01 20:20 ` Rob Herring 2021-04-01 20:20 ` Rob Herring 2021-04-07 2:04 ` Leizhen (ThunderTown) 2021-04-07 2:04 ` Leizhen (ThunderTown) 2021-04-08 12:28 ` Leizhen (ThunderTown) 2021-04-08 12:28 ` Leizhen (ThunderTown) 2021-04-08 20:42 ` Rob Herring 2021-04-08 20:42 ` Rob Herring 2021-04-12 6:45 ` Leizhen (ThunderTown) 2021-04-12 6:45 ` Leizhen (ThunderTown)
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.