All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH RFC 1/2] ASoC: dt-bindings: renesas,rsnd.yaml: tidyup reg/reg-name
Date: Tue, 7 Feb 2023 15:16:21 -0600	[thread overview]
Message-ID: <20230207211621.GA4158591-robh@kernel.org> (raw)
In-Reply-To: <87pmamuvlh.wl-kuninori.morimoto.gx@renesas.com>

On Tue, Feb 07, 2023 at 01:12:42AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Current reg/reg-name is using "maxItems", but the convention is to
> use "minItems".

Yes, but that's not really true in if/then schemas. If that's your 
reason, then the changes are wrong.

> And the core DT schemas already have a constraint that
> requires reg-names to have the same number of elements as reg.

Actually, no it doesn't.

> 
> This patch switch to use "minItems" on reg, and remove it from
> reg-names.
> 
> Link: https://lore.kernel.org/r/46974ae7-5f7f-8fc1-4ea8-fe77b58f5bfb@linaro.org
> Reported-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> index d106de00c6b2..223f4859780f 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> @@ -298,9 +298,8 @@ allOf:
>      then:
>        properties:
>          reg:
> -          maxItems: 3
> +          minItems: 3

This was probably correct before if the base 'reg' entry says more than 
3 entries are allowed and in this case 3 is most you can have.

>          reg-names:
> -          maxItems: 3
>            items:
>              enum:
>                - scu
> @@ -309,9 +308,8 @@ allOf:
>      else:
>        properties:
>          reg:
> -          maxItems: 5
> +          minItems: 5

This might be correct...

>          reg-names:
> -          maxItems: 5
>            items:
>              enum:
>                - scu
> -- 
> 2.25.1
> 
_______________________________________________
Alsa-devel mailing list -- alsa-devel@alsa-project.org
To unsubscribe send an email to alsa-devel-leave@alsa-project.org

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH RFC 1/2] ASoC: dt-bindings: renesas,rsnd.yaml: tidyup reg/reg-name
Date: Tue, 7 Feb 2023 15:16:21 -0600	[thread overview]
Message-ID: <20230207211621.GA4158591-robh@kernel.org> (raw)
In-Reply-To: <87pmamuvlh.wl-kuninori.morimoto.gx@renesas.com>

On Tue, Feb 07, 2023 at 01:12:42AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Current reg/reg-name is using "maxItems", but the convention is to
> use "minItems".

Yes, but that's not really true in if/then schemas. If that's your 
reason, then the changes are wrong.

> And the core DT schemas already have a constraint that
> requires reg-names to have the same number of elements as reg.

Actually, no it doesn't.

> 
> This patch switch to use "minItems" on reg, and remove it from
> reg-names.
> 
> Link: https://lore.kernel.org/r/46974ae7-5f7f-8fc1-4ea8-fe77b58f5bfb@linaro.org
> Reported-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> index d106de00c6b2..223f4859780f 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> @@ -298,9 +298,8 @@ allOf:
>      then:
>        properties:
>          reg:
> -          maxItems: 3
> +          minItems: 3

This was probably correct before if the base 'reg' entry says more than 
3 entries are allowed and in this case 3 is most you can have.

>          reg-names:
> -          maxItems: 3
>            items:
>              enum:
>                - scu
> @@ -309,9 +308,8 @@ allOf:
>      else:
>        properties:
>          reg:
> -          maxItems: 5
> +          minItems: 5

This might be correct...

>          reg-names:
> -          maxItems: 5
>            items:
>              enum:
>                - scu
> -- 
> 2.25.1
> 

  reply	other threads:[~2023-02-07 23:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  1:12 [PATCH RFC 0/2] ASoC: dt-bindings: renesas, rsnd.yaml: adjust to R-Car Gen4 Kuninori Morimoto
2023-02-07  1:12 ` [PATCH RFC 0/2] ASoC: dt-bindings: renesas,rsnd.yaml: " Kuninori Morimoto
2023-02-07  1:12 ` [PATCH RFC 1/2] ASoC: dt-bindings: renesas, rsnd.yaml: tidyup reg/reg-name Kuninori Morimoto
2023-02-07  1:12   ` [PATCH RFC 1/2] ASoC: dt-bindings: renesas,rsnd.yaml: " Kuninori Morimoto
2023-02-07 21:16   ` Rob Herring [this message]
2023-02-07 21:16     ` Rob Herring
2023-02-07  1:12 ` [PATCH RFC 2/2] ASoC: dt-bindings: renesas, rsnd.yaml: adjust to R-Car Gen4 Kuninori Morimoto
2023-02-07  1:12   ` [PATCH RFC 2/2] ASoC: dt-bindings: renesas,rsnd.yaml: " Kuninori Morimoto
2023-02-07  8:00 ` [PATCH RFC 0/2] " Geert Uytterhoeven
2023-02-07  8:00   ` Geert Uytterhoeven
2023-02-08  1:03   ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230207211621.GA4158591-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.