All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas, rsnd.yaml
@ 2021-03-30  3:06 ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2021-03-30  3:06 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 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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
1.8.3



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml
@ 2021-03-30  3:06 ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2021-03-30  3: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 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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
1.8.3



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
  2021-03-30  3:06 ` [PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei
@ 2021-03-30  3:06   ` Zhen Lei
  -1 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2021-03-30  3: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, I found that all nodes that contain the "dais" property have
compatible string: "audio-graph-card". So I can be sure that the
"$ref: audio-graph.yaml#" should be corrected to
"$ref: audio-graph-card.yaml#".

In addition, not all nodes have compatible string "audio-graph-card", so
the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To
ensure the validation of "anyOf" always passes, group it with the "if"
statement, because the result of the "if" statement is always not empty.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 2e1046513603ed0..487aeabd1f0e65b 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -256,8 +256,10 @@ required:
   - "#sound-dai-cells"
 
 allOf:
-  - $ref: audio-graph.yaml#
   - $ref: audio-graph-port.yaml#
+
+anyOf:
+  - $ref: audio-graph-card.yaml#
   - if:
       properties:
         compatible:
-- 
1.8.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
@ 2021-03-30  3:06   ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2021-03-30  3:06 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, I found that all nodes that contain the "dais" property have
compatible string: "audio-graph-card". So I can be sure that the
"$ref: audio-graph.yaml#" should be corrected to
"$ref: audio-graph-card.yaml#".

In addition, not all nodes have compatible string "audio-graph-card", so
the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To
ensure the validation of "anyOf" always passes, group it with the "if"
statement, because the result of the "if" statement is always not empty.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 2e1046513603ed0..487aeabd1f0e65b 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -256,8 +256,10 @@ required:
   - "#sound-dai-cells"
 
 allOf:
-  - $ref: audio-graph.yaml#
   - $ref: audio-graph-port.yaml#
+
+anyOf:
+  - $ref: audio-graph-card.yaml#
   - if:
       properties:
         compatible:
-- 
1.8.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
  2021-03-30  3:06 ` [PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei
@ 2021-03-30  3:06   ` Zhen Lei
  -1 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2021-03-30  3:06 UTC (permalink / raw
  To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree,
	linux-kernel
  Cc: Zhen Lei, Kuninori Morimoto

Currently, the property "ports" is always present. So mark it as true, and
let audio-graph-card.yaml to check it.

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 487aeabd1f0e65b..d3c2899843aee58 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -112,6 +112,7 @@ properties:
         - pattern: '^clk_(a|b|c|i)$'
 
   port: true
+  ports: true
 
 # use patternProperties to avoid naming "xxx,yyy" issue
 patternProperties:
-- 
1.8.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes
@ 2021-03-30  3:06   ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2021-03-30  3:06 UTC (permalink / raw
  To: Liam Girdwood, Mark Brown, Rob Herring, alsa-devel, devicetree,
	linux-kernel
  Cc: Kuninori Morimoto, Zhen Lei

Currently, the property "ports" is always present. So mark it as true, and
let audio-graph-card.yaml to check it.

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 487aeabd1f0e65b..d3c2899843aee58 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -112,6 +112,7 @@ properties:
         - pattern: '^clk_(a|b|c|i)$'
 
   port: true
+  ports: true
 
 # use patternProperties to avoid naming "xxx,yyy" issue
 patternProperties:
-- 
1.8.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
  2021-03-30  3:06   ` Zhen Lei
@ 2021-03-30 22:45     ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2021-03-30 22:45 UTC (permalink / raw
  To: Zhen Lei
  Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel,
	Kuninori Morimoto

On Tue, Mar 30, 2021 at 11:06:30AM +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, I found that all nodes that contain the "dais" property have
> compatible string: "audio-graph-card". So I can be sure that the
> "$ref: audio-graph.yaml#" should be corrected to
> "$ref: audio-graph-card.yaml#".
> 
> In addition, not all nodes have compatible string "audio-graph-card", so
> the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To
> ensure the validation of "anyOf" always passes, group it with the "if"
> statement, because the result of the "if" statement is always not empty.

'anyOf' is probably not right here.

In any case, the is going to conflict with my series[1].

Rob

[1] https://lore.kernel.org/r/20210323163634.877511-1-robh@kernel.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
@ 2021-03-30 22:45     ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2021-03-30 22:45 UTC (permalink / raw
  To: Zhen Lei
  Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood,
	linux-kernel, Mark Brown

On Tue, Mar 30, 2021 at 11:06:30AM +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, I found that all nodes that contain the "dais" property have
> compatible string: "audio-graph-card". So I can be sure that the
> "$ref: audio-graph.yaml#" should be corrected to
> "$ref: audio-graph-card.yaml#".
> 
> In addition, not all nodes have compatible string "audio-graph-card", so
> the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To
> ensure the validation of "anyOf" always passes, group it with the "if"
> statement, because the result of the "if" statement is always not empty.

'anyOf' is probably not right here.

In any case, the is going to conflict with my series[1].

Rob

[1] https://lore.kernel.org/r/20210323163634.877511-1-robh@kernel.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
  2021-03-30 22:45     ` Rob Herring
@ 2021-03-31  2:25       ` Leizhen (ThunderTown)
  -1 siblings, 0 replies; 10+ messages in thread
From: Leizhen (ThunderTown) @ 2021-03-31  2:25 UTC (permalink / raw
  To: Rob Herring
  Cc: devicetree, alsa-devel, Kuninori Morimoto, Liam Girdwood,
	linux-kernel, Mark Brown



On 2021/3/31 6:45, Rob Herring wrote:
> On Tue, Mar 30, 2021 at 11:06:30AM +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, I found that all nodes that contain the "dais" property have
>> compatible string: "audio-graph-card". So I can be sure that the
>> "$ref: audio-graph.yaml#" should be corrected to
>> "$ref: audio-graph-card.yaml#".
>>
>> In addition, not all nodes have compatible string "audio-graph-card", so
>> the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To
>> ensure the validation of "anyOf" always passes, group it with the "if"
>> statement, because the result of the "if" statement is always not empty.
> 
> 'anyOf' is probably not right here.

Oh, yes, I think I should use "if" statement to enumerate cases where
"audio-graph-card.yaml" is required.

> 
> In any case, the is going to conflict with my series[1].

OK, I'll rework my patch based on your series.

> 
> Rob
> 
> [1] https://lore.kernel.org/r/20210323163634.877511-1-robh@kernel.org/
> 
> .
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property
@ 2021-03-31  2:25       ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 10+ messages in thread
From: Leizhen (ThunderTown) @ 2021-03-31  2:25 UTC (permalink / raw
  To: Rob Herring
  Cc: Liam Girdwood, Mark Brown, alsa-devel, devicetree, linux-kernel,
	Kuninori Morimoto



On 2021/3/31 6:45, Rob Herring wrote:
> On Tue, Mar 30, 2021 at 11:06:30AM +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, I found that all nodes that contain the "dais" property have
>> compatible string: "audio-graph-card". So I can be sure that the
>> "$ref: audio-graph.yaml#" should be corrected to
>> "$ref: audio-graph-card.yaml#".
>>
>> In addition, not all nodes have compatible string "audio-graph-card", so
>> the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To
>> ensure the validation of "anyOf" always passes, group it with the "if"
>> statement, because the result of the "if" statement is always not empty.
> 
> 'anyOf' is probably not right here.

Oh, yes, I think I should use "if" statement to enumerate cases where
"audio-graph-card.yaml" is required.

> 
> In any case, the is going to conflict with my series[1].

OK, I'll rework my patch based on your series.

> 
> Rob
> 
> [1] https://lore.kernel.org/r/20210323163634.877511-1-robh@kernel.org/
> 
> .
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-31  2:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30  3:06 [PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas, rsnd.yaml Zhen Lei
2021-03-30  3:06 ` [PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml Zhen Lei
2021-03-30  3:06 ` [PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property Zhen Lei
2021-03-30  3:06   ` Zhen Lei
2021-03-30 22:45   ` Rob Herring
2021-03-30 22:45     ` Rob Herring
2021-03-31  2:25     ` Leizhen (ThunderTown)
2021-03-31  2:25       ` Leizhen (ThunderTown)
2021-03-30  3:06 ` [PATCH 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Zhen Lei
2021-03-30  3:06   ` Zhen Lei

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.