All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells
@ 2020-05-21  3:54 Kuninori Morimoto
  2020-05-28 22:39   ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Kuninori Morimoto @ 2020-05-21  3:54 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland
  Cc: devicetree, alsa-devel, linux-kernel

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card will get below error,
because it doesn't care about #address-cells at some part.

	DTC     Documentation/devicetree/bindings/sound/simple-card.example.dt.yaml
	Documentation/devicetree/bindings/sound/simple-card.example.dts:171.46-173.15: \
		Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: \
		node has a unit name, but no reg or ranges property
	Documentation/devicetree/bindings/sound/simple-card.example.dts:175.37-177.15: \
		Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: \
		node has a unit name, but no reg or ranges property
	...

This patch fixup this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/simple-card.yaml           | 25 ++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
index cb2bb5fac0e1..6c4c2c6d6d3c 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.yaml
+++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
@@ -208,6 +208,11 @@ patternProperties:
       reg:
         maxItems: 1
 
+      "#address-cells":
+        const: 1
+      "#size-cells":
+        const: 0
+
       # common properties
       frame-master:
         $ref: "#/definitions/frame-master"
@@ -288,7 +293,6 @@ examples:
 
         #address-cells = <1>;
         #size-cells = <0>;
-
         simple-audio-card,dai-link@0 {		/* I2S - HDMI */
             reg = <0>;
             format = "i2s";
@@ -392,11 +396,15 @@ examples:
         simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
                                     "ak4642 Playback", "DAI1 Playback";
 
+        #address-cells = <1>;
+        #size-cells = <0>;
         dpcmcpu: simple-audio-card,cpu@0 {
+            reg = <0>;
             sound-dai = <&rcar_sound 0>;
         };
 
         simple-audio-card,cpu@1 {
+            reg = <1>;
             sound-dai = <&rcar_sound 1>;
         };
 
@@ -427,7 +435,12 @@ examples:
             "pcm3168a Playback", "DAI3 Playback",
             "pcm3168a Playback", "DAI4 Playback";
 
+        #address-cells = <1>;
+        #size-cells = <0>;
+
         simple-audio-card,dai-link@0 {
+            reg = <0>;
+
             format = "left_j";
             bitclock-master = <&sndcpu0>;
             frame-master = <&sndcpu0>;
@@ -441,22 +454,30 @@ examples:
         };
 
         simple-audio-card,dai-link@1 {
+            reg = <1>;
+
             format = "i2s";
             bitclock-master = <&sndcpu1>;
             frame-master = <&sndcpu1>;
 
             convert-channels = <8>; /* TDM Split */
 
+            #address-cells = <1>;
+            #size-cells = <0>;
             sndcpu1: cpu@0 {
+                reg = <0>;
                 sound-dai = <&rcar_sound 1>;
             };
             cpu@1 {
+                reg = <1>;
                 sound-dai = <&rcar_sound 2>;
             };
             cpu@2 {
+                reg = <2>;
                 sound-dai = <&rcar_sound 3>;
             };
             cpu@3 {
+                reg = <3>;
                 sound-dai = <&rcar_sound 4>;
             };
             codec {
@@ -468,6 +489,8 @@ examples:
         };
 
         simple-audio-card,dai-link@2 {
+            reg = <2>;
+
             format = "i2s";
             bitclock-master = <&sndcpu2>;
             frame-master = <&sndcpu2>;
-- 
2.17.1


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

* Re: [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells
  2020-05-21  3:54 [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells Kuninori Morimoto
@ 2020-05-28 22:39   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-05-28 22:39 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Liam Girdwood, Mark Brown, Mark Rutland, devicetree, alsa-devel,
	linux-kernel

On Thu, May 21, 2020 at 12:54:56PM +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Current simple-card will get below error,
> because it doesn't care about #address-cells at some part.
> 
> 	DTC     Documentation/devicetree/bindings/sound/simple-card.example.dt.yaml
> 	Documentation/devicetree/bindings/sound/simple-card.example.dts:171.46-173.15: \
> 		Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: \
> 		node has a unit name, but no reg or ranges property
> 	Documentation/devicetree/bindings/sound/simple-card.example.dts:175.37-177.15: \
> 		Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: \
> 		node has a unit name, but no reg or ranges property
> 	...
> 
> This patch fixup this issue.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../bindings/sound/simple-card.yaml           | 25 ++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
> index cb2bb5fac0e1..6c4c2c6d6d3c 100644
> --- a/Documentation/devicetree/bindings/sound/simple-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
> @@ -208,6 +208,11 @@ patternProperties:
>        reg:
>          maxItems: 1
>  
> +      "#address-cells":
> +        const: 1
> +      "#size-cells":
> +        const: 0
> +
>        # common properties
>        frame-master:
>          $ref: "#/definitions/frame-master"
> @@ -288,7 +293,6 @@ examples:
>  
>          #address-cells = <1>;
>          #size-cells = <0>;
> -
>          simple-audio-card,dai-link@0 {		/* I2S - HDMI */
>              reg = <0>;
>              format = "i2s";
> @@ -392,11 +396,15 @@ examples:
>          simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
>                                      "ak4642 Playback", "DAI1 Playback";
>  
> +        #address-cells = <1>;
> +        #size-cells = <0>;
>          dpcmcpu: simple-audio-card,cpu@0 {
> +            reg = <0>;

You need to add 'reg' to the schema. This isn't flagged because 
'additionalProperties: false' is missing there too. 

>              sound-dai = <&rcar_sound 0>;
>          };
>  
>          simple-audio-card,cpu@1 {
> +            reg = <1>;
>              sound-dai = <&rcar_sound 1>;
>          };
>  
> @@ -427,7 +435,12 @@ examples:
>              "pcm3168a Playback", "DAI3 Playback",
>              "pcm3168a Playback", "DAI4 Playback";
>  
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
>          simple-audio-card,dai-link@0 {
> +            reg = <0>;
> +
>              format = "left_j";
>              bitclock-master = <&sndcpu0>;
>              frame-master = <&sndcpu0>;
> @@ -441,22 +454,30 @@ examples:
>          };
>  
>          simple-audio-card,dai-link@1 {
> +            reg = <1>;
> +
>              format = "i2s";
>              bitclock-master = <&sndcpu1>;
>              frame-master = <&sndcpu1>;
>  
>              convert-channels = <8>; /* TDM Split */
>  
> +            #address-cells = <1>;
> +            #size-cells = <0>;
>              sndcpu1: cpu@0 {
> +                reg = <0>;
>                  sound-dai = <&rcar_sound 1>;
>              };
>              cpu@1 {
> +                reg = <1>;
>                  sound-dai = <&rcar_sound 2>;
>              };
>              cpu@2 {
> +                reg = <2>;
>                  sound-dai = <&rcar_sound 3>;
>              };
>              cpu@3 {
> +                reg = <3>;
>                  sound-dai = <&rcar_sound 4>;
>              };
>              codec {
> @@ -468,6 +489,8 @@ examples:
>          };
>  
>          simple-audio-card,dai-link@2 {
> +            reg = <2>;
> +
>              format = "i2s";
>              bitclock-master = <&sndcpu2>;
>              frame-master = <&sndcpu2>;
> -- 
> 2.17.1
> 

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

* Re: [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells
@ 2020-05-28 22:39   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-05-28 22:39 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Rutland, devicetree, alsa-devel, Liam Girdwood,
	linux-kernel, Mark Brown

On Thu, May 21, 2020 at 12:54:56PM +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Current simple-card will get below error,
> because it doesn't care about #address-cells at some part.
> 
> 	DTC     Documentation/devicetree/bindings/sound/simple-card.example.dt.yaml
> 	Documentation/devicetree/bindings/sound/simple-card.example.dts:171.46-173.15: \
> 		Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: \
> 		node has a unit name, but no reg or ranges property
> 	Documentation/devicetree/bindings/sound/simple-card.example.dts:175.37-177.15: \
> 		Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: \
> 		node has a unit name, but no reg or ranges property
> 	...
> 
> This patch fixup this issue.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../bindings/sound/simple-card.yaml           | 25 ++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
> index cb2bb5fac0e1..6c4c2c6d6d3c 100644
> --- a/Documentation/devicetree/bindings/sound/simple-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
> @@ -208,6 +208,11 @@ patternProperties:
>        reg:
>          maxItems: 1
>  
> +      "#address-cells":
> +        const: 1
> +      "#size-cells":
> +        const: 0
> +
>        # common properties
>        frame-master:
>          $ref: "#/definitions/frame-master"
> @@ -288,7 +293,6 @@ examples:
>  
>          #address-cells = <1>;
>          #size-cells = <0>;
> -
>          simple-audio-card,dai-link@0 {		/* I2S - HDMI */
>              reg = <0>;
>              format = "i2s";
> @@ -392,11 +396,15 @@ examples:
>          simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
>                                      "ak4642 Playback", "DAI1 Playback";
>  
> +        #address-cells = <1>;
> +        #size-cells = <0>;
>          dpcmcpu: simple-audio-card,cpu@0 {
> +            reg = <0>;

You need to add 'reg' to the schema. This isn't flagged because 
'additionalProperties: false' is missing there too. 

>              sound-dai = <&rcar_sound 0>;
>          };
>  
>          simple-audio-card,cpu@1 {
> +            reg = <1>;
>              sound-dai = <&rcar_sound 1>;
>          };
>  
> @@ -427,7 +435,12 @@ examples:
>              "pcm3168a Playback", "DAI3 Playback",
>              "pcm3168a Playback", "DAI4 Playback";
>  
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
>          simple-audio-card,dai-link@0 {
> +            reg = <0>;
> +
>              format = "left_j";
>              bitclock-master = <&sndcpu0>;
>              frame-master = <&sndcpu0>;
> @@ -441,22 +454,30 @@ examples:
>          };
>  
>          simple-audio-card,dai-link@1 {
> +            reg = <1>;
> +
>              format = "i2s";
>              bitclock-master = <&sndcpu1>;
>              frame-master = <&sndcpu1>;
>  
>              convert-channels = <8>; /* TDM Split */
>  
> +            #address-cells = <1>;
> +            #size-cells = <0>;
>              sndcpu1: cpu@0 {
> +                reg = <0>;
>                  sound-dai = <&rcar_sound 1>;
>              };
>              cpu@1 {
> +                reg = <1>;
>                  sound-dai = <&rcar_sound 2>;
>              };
>              cpu@2 {
> +                reg = <2>;
>                  sound-dai = <&rcar_sound 3>;
>              };
>              cpu@3 {
> +                reg = <3>;
>                  sound-dai = <&rcar_sound 4>;
>              };
>              codec {
> @@ -468,6 +489,8 @@ examples:
>          };
>  
>          simple-audio-card,dai-link@2 {
> +            reg = <2>;
> +
>              format = "i2s";
>              bitclock-master = <&sndcpu2>;
>              frame-master = <&sndcpu2>;
> -- 
> 2.17.1
> 

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

* Question about "xxx,yyy" style property
  2020-05-28 22:39   ` Rob Herring
@ 2020-05-29  2:41     ` Kuninori Morimoto
  -1 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2020-05-29  2:41 UTC (permalink / raw)
  To: Rob Herring
  Cc: Liam Girdwood, Mark Brown, Mark Rutland, devicetree, alsa-devel,
	linux-kernel


The Subject was "Re: [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells"

Hi Rob

I'm trying to create v2 of simple-card patch,
And got issue which I can't solve by myself.

I think "xxx,yyy" (= which has "," at the property name)
needs special care, but it is very un-understandable...
Now, I'm give up.
So, can I ask you 2 things about Yaml Doc "xxx,yyy" type property ?

========================
1) reference own definitions from "xxx,yyy"
========================

I guess "xxx,yyy" naming property needs to has "description", right ?

But, it is OK if it references "/schemas/xxxx"

	--- OK ------
	xxx,yyy:
	  description: xxx
	  $ref: /schemas/types.yaml#/definitions/phandle-array
	-------------

but, will be error if it references own definitions

	--- NG ------
	xxx,yyy:
	  description: xxx
	  $ref: "#/definitions/mydef"
	-------------

This is the related error

	-- error(?) --
	xxx.yaml: properties:xxx,yyy:\
	  $ref: '#/definitions/mydef' does not match 'types.yaml#[/]{0,1}definitions/.*'
	--------------

# but, there is no problem if it was defined as "patternProperties"

Q. The "xxx,yyy" property can't references own definitions,
   or needs some magical extra settings ??

========================
2) phandle for "xxx,yyy"
========================

I noticed that it seems "xxx,yyy" property can't be referenced.
Here, "xxx,yyy" has "type: object" and "additionalProperties: false"
(below didn't happen if it doesn't have "additionalProperties: false")

If "xxx,yyy" has phandle, but not referenced,
This is not a problem.

	--- OK ---
	...
	foo = <&bar>;
	...
	xxx_yyy: xxx,yyy {
	  ...
	};
	--------------

But will be error if it is referenced.

	--- NG ---
	foo = <&xxx_yyy>;
	...
	xxx_yyy: xxx,yyy {
	  ...
	};
	------------

The error is

	-- error ---
	xxx.yaml: xxx.yyy: \
	Additional properties are not allowed ('phandle' was unexpected)
	------------

Q. The "xxx,yyy" needs magical settings to be referenced, or can't be ?

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

* Question about "xxx,yyy" style property
@ 2020-05-29  2:41     ` Kuninori Morimoto
  0 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2020-05-29  2:41 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree, alsa-devel, Liam Girdwood,
	linux-kernel, Mark Brown


The Subject was "Re: [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells"

Hi Rob

I'm trying to create v2 of simple-card patch,
And got issue which I can't solve by myself.

I think "xxx,yyy" (= which has "," at the property name)
needs special care, but it is very un-understandable...
Now, I'm give up.
So, can I ask you 2 things about Yaml Doc "xxx,yyy" type property ?

========================
1) reference own definitions from "xxx,yyy"
========================

I guess "xxx,yyy" naming property needs to has "description", right ?

But, it is OK if it references "/schemas/xxxx"

	--- OK ------
	xxx,yyy:
	  description: xxx
	  $ref: /schemas/types.yaml#/definitions/phandle-array
	-------------

but, will be error if it references own definitions

	--- NG ------
	xxx,yyy:
	  description: xxx
	  $ref: "#/definitions/mydef"
	-------------

This is the related error

	-- error(?) --
	xxx.yaml: properties:xxx,yyy:\
	  $ref: '#/definitions/mydef' does not match 'types.yaml#[/]{0,1}definitions/.*'
	--------------

# but, there is no problem if it was defined as "patternProperties"

Q. The "xxx,yyy" property can't references own definitions,
   or needs some magical extra settings ??

========================
2) phandle for "xxx,yyy"
========================

I noticed that it seems "xxx,yyy" property can't be referenced.
Here, "xxx,yyy" has "type: object" and "additionalProperties: false"
(below didn't happen if it doesn't have "additionalProperties: false")

If "xxx,yyy" has phandle, but not referenced,
This is not a problem.

	--- OK ---
	...
	foo = <&bar>;
	...
	xxx_yyy: xxx,yyy {
	  ...
	};
	--------------

But will be error if it is referenced.

	--- NG ---
	foo = <&xxx_yyy>;
	...
	xxx_yyy: xxx,yyy {
	  ...
	};
	------------

The error is

	-- error ---
	xxx.yaml: xxx.yyy: \
	Additional properties are not allowed ('phandle' was unexpected)
	------------

Q. The "xxx,yyy" needs magical settings to be referenced, or can't be ?

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

* Re: Question about "xxx,yyy" style property
  2020-05-29  2:41     ` Kuninori Morimoto
@ 2020-07-02 13:54       ` Rob Herring
  -1 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-07-02 13:54 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Liam Girdwood, Mark Brown, Mark Rutland, devicetree, Linux-ALSA,
	linux-kernel

On Thu, May 28, 2020 at 8:41 PM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>
>
> The Subject was "Re: [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells"
>
> Hi Rob
>
> I'm trying to create v2 of simple-card patch,
> And got issue which I can't solve by myself.
>
> I think "xxx,yyy" (= which has "," at the property name)
> needs special care, but it is very un-understandable...
> Now, I'm give up.
> So, can I ask you 2 things about Yaml Doc "xxx,yyy" type property ?
>
> ========================
> 1) reference own definitions from "xxx,yyy"
> ========================
>
> I guess "xxx,yyy" naming property needs to has "description", right ?
>
> But, it is OK if it references "/schemas/xxxx"
>
>         --- OK ------
>         xxx,yyy:
>           description: xxx
>           $ref: /schemas/types.yaml#/definitions/phandle-array
>         -------------
>
> but, will be error if it references own definitions
>
>         --- NG ------
>         xxx,yyy:
>           description: xxx
>           $ref: "#/definitions/mydef"
>         -------------
>
> This is the related error
>
>         -- error(?) --
>         xxx.yaml: properties:xxx,yyy:\
>           $ref: '#/definitions/mydef' does not match 'types.yaml#[/]{0,1}definitions/.*'
>         --------------
>
> # but, there is no problem if it was defined as "patternProperties"
>
> Q. The "xxx,yyy" property can't references own definitions,
>    or needs some magical extra settings ??

No, it can't. The problem with definitions is we can't really check
and do fixups on the definitions with the meta-schema.

> ========================
> 2) phandle for "xxx,yyy"
> ========================
>
> I noticed that it seems "xxx,yyy" property can't be referenced.
> Here, "xxx,yyy" has "type: object" and "additionalProperties: false"
> (below didn't happen if it doesn't have "additionalProperties: false")
>
> If "xxx,yyy" has phandle, but not referenced,
> This is not a problem.
>
>         --- OK ---
>         ...
>         foo = <&bar>;
>         ...
>         xxx_yyy: xxx,yyy {
>           ...
>         };
>         --------------
>
> But will be error if it is referenced.
>
>         --- NG ---
>         foo = <&xxx_yyy>;
>         ...
>         xxx_yyy: xxx,yyy {
>           ...
>         };
>         ------------
>
> The error is
>
>         -- error ---
>         xxx.yaml: xxx.yyy: \
>         Additional properties are not allowed ('phandle' was unexpected)
>         ------------
>
> Q. The "xxx,yyy" needs magical settings to be referenced, or can't be ?

'phandle' (among other things) is automatically added by the tools. If
'xxx,yyy' is defined thru a 'definitions' then that fix-up is not
going to happen.

Rob

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

* Re: Question about "xxx,yyy" style property
@ 2020-07-02 13:54       ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-07-02 13:54 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Rutland, devicetree, Linux-ALSA, Liam Girdwood,
	linux-kernel, Mark Brown

On Thu, May 28, 2020 at 8:41 PM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>
>
> The Subject was "Re: [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells"
>
> Hi Rob
>
> I'm trying to create v2 of simple-card patch,
> And got issue which I can't solve by myself.
>
> I think "xxx,yyy" (= which has "," at the property name)
> needs special care, but it is very un-understandable...
> Now, I'm give up.
> So, can I ask you 2 things about Yaml Doc "xxx,yyy" type property ?
>
> ========================
> 1) reference own definitions from "xxx,yyy"
> ========================
>
> I guess "xxx,yyy" naming property needs to has "description", right ?
>
> But, it is OK if it references "/schemas/xxxx"
>
>         --- OK ------
>         xxx,yyy:
>           description: xxx
>           $ref: /schemas/types.yaml#/definitions/phandle-array
>         -------------
>
> but, will be error if it references own definitions
>
>         --- NG ------
>         xxx,yyy:
>           description: xxx
>           $ref: "#/definitions/mydef"
>         -------------
>
> This is the related error
>
>         -- error(?) --
>         xxx.yaml: properties:xxx,yyy:\
>           $ref: '#/definitions/mydef' does not match 'types.yaml#[/]{0,1}definitions/.*'
>         --------------
>
> # but, there is no problem if it was defined as "patternProperties"
>
> Q. The "xxx,yyy" property can't references own definitions,
>    or needs some magical extra settings ??

No, it can't. The problem with definitions is we can't really check
and do fixups on the definitions with the meta-schema.

> ========================
> 2) phandle for "xxx,yyy"
> ========================
>
> I noticed that it seems "xxx,yyy" property can't be referenced.
> Here, "xxx,yyy" has "type: object" and "additionalProperties: false"
> (below didn't happen if it doesn't have "additionalProperties: false")
>
> If "xxx,yyy" has phandle, but not referenced,
> This is not a problem.
>
>         --- OK ---
>         ...
>         foo = <&bar>;
>         ...
>         xxx_yyy: xxx,yyy {
>           ...
>         };
>         --------------
>
> But will be error if it is referenced.
>
>         --- NG ---
>         foo = <&xxx_yyy>;
>         ...
>         xxx_yyy: xxx,yyy {
>           ...
>         };
>         ------------
>
> The error is
>
>         -- error ---
>         xxx.yaml: xxx.yyy: \
>         Additional properties are not allowed ('phandle' was unexpected)
>         ------------
>
> Q. The "xxx,yyy" needs magical settings to be referenced, or can't be ?

'phandle' (among other things) is automatically added by the tools. If
'xxx,yyy' is defined thru a 'definitions' then that fix-up is not
going to happen.

Rob

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

end of thread, other threads:[~2020-07-02 13:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21  3:54 [PATCH] ASoC: dt-bindings: simple-card: care missing address #address-cells Kuninori Morimoto
2020-05-28 22:39 ` Rob Herring
2020-05-28 22:39   ` Rob Herring
2020-05-29  2:41   ` Question about "xxx,yyy" style property Kuninori Morimoto
2020-05-29  2:41     ` Kuninori Morimoto
2020-07-02 13:54     ` Rob Herring
2020-07-02 13:54       ` Rob Herring

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.