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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 21, 2020 at 12:54:56PM +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> ---
>  .../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
> 



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux