devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: display: renesas,du: narrow interrupts and resets per variants
Date: Wed, 28 Aug 2024 15:45:17 +0300	[thread overview]
Message-ID: <20240828124517.GA23978@pendragon.ideasonboard.com> (raw)
In-Reply-To: <526b6f56-7807-4bb6-9365-077b1cc490b2@linaro.org>

Hi Krzysztof,

On Sun, Aug 18, 2024 at 08:48:54PM +0200, Krzysztof Kozlowski wrote:
> On 18/08/2024 19:51, Laurent Pinchart wrote:
> > On Sun, Aug 18, 2024 at 07:44:22PM +0200, Krzysztof Kozlowski wrote:
> >> On 18/08/2024 19:41, Laurent Pinchart wrote:
> >>> On Sun, Aug 18, 2024 at 07:30:02PM +0200, Krzysztof Kozlowski wrote:
> >>>> Each variable-length property like interrupts or resets must have fixed
> >>>> constraints on number of items for given variant in binding.  The
> >>>> clauses in "if:then:" block should define both limits: upper and lower.
> >>>
> >>> I thought that, when only one of minItems or maxItems was specified, the
> >>> other automatically defaulted to the same value. I'm pretty sure I
> >>> recall Rob asking me to drop one of the two in some bindings. Has the
> >>> rule changes ? Is it documented somewhere ?
> >>
> >> New dtschema changed it and, even if previous behavior is restored, the
> >> size in if:then: always had to be constrained. You could have skipped
> >> one side of limit if it was equal to outer/top-level limit, e.g:
> >>
> >> properties:
> >>   clocks:
> >>     minItems: 1
> >>     maxItems: 2
> >>
> >>
> >> if:then:properties:
> >>   clocks:
> >>     minItems: 2
> > 
> > Where can I find a description of the behaviour of the new dtschema
> > (hopefully with some documentation) ?
> 
> No clue, but I feel there is some core concept missing. Your earlier
> statement:
> "I thought that, when only one of minItems or maxItems was specified, the"
> 
> was never logically correct for the "if:then", except for the case I
> mentioned above. That's why all schema used as examples had it explicit:
> 
> My talk from 2022, page 30:
> https://static.sched.com/hosted_files/osseu2022/bd/How%20to%20Get%20Your%20DT%20Schema%20Bindings%20Accepted%20in%20Less%20than%2010%20Iterations%20-%20Krzysztof%20Kozlowski%2C%20Linaro.pdf?_gl=1*kmzqmt*_gcl_au*MTU2MzQ1MjY0Mi4xNzIxNzE0NDc1
> all constraints defined,.
> 
> My talk from 2023, page 34:
> https://static.sched.com/hosted_files/eoss2023/a8/How%20to%20Get%20Your%20DT%20Schema%20Bindings%20Accepted%20in%20Less%20than%2010%20Iterations%20-%20Krzysztof%20Kozlowski%2C%20Linaro%20-%20ELCE%202023.pdf?_gl=1*1jgx6d3*_gcl_au*MTU2MzQ1MjY0Mi4xNzIxNzE0NDc1
> 
> Recently, I started using other example as "useful reference":
> https://elixir.bootlin.com/linux/v6.8/source/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml#L132
> 
> That's nothing. All three above reference examples I keep giving are
> already there and repeated in emails all the time.
> 
> So aren't you confusing the entire "skip one limit" for top-level
> properties? This patch is not about it all and dtschema did not change.

There must have been a misunderstanding indeed, I interpreted "New
dtschema changed it" as meaning there were now new rules. Is that
incorrect ?

If you don't mind clarifying, what is the current recommendation to
indicate that a property has a fixed number of items ? Which of the
following three options is preferred ?

properties:
  clocks:
    minItems: 2

properties:
  clocks:
    maxItems: 2

properties:
  clocks:
    minItems: 2
    maxItems: 2

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-08-28 12:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-18 17:30 [PATCH 1/2] dt-bindings: display: renesas,du: narrow interrupts and resets per variants Krzysztof Kozlowski
2024-08-18 17:30 ` [PATCH 2/2] dt-bindings: display: renesas,du: add top-level constraints Krzysztof Kozlowski
2024-08-18 17:46   ` Laurent Pinchart
2024-08-19 17:11   ` Conor Dooley
2024-08-18 17:41 ` [PATCH 1/2] dt-bindings: display: renesas,du: narrow interrupts and resets per variants Laurent Pinchart
2024-08-18 17:44   ` Krzysztof Kozlowski
2024-08-18 17:51     ` Laurent Pinchart
2024-08-18 18:48       ` Krzysztof Kozlowski
2024-08-28 12:45         ` Laurent Pinchart [this message]
2024-08-28 12:52           ` Krzysztof Kozlowski
2024-08-28 13:29             ` Laurent Pinchart
2024-08-19 17:12 ` Conor Dooley

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=20240828124517.GA23978@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magnus.damm@gmail.com \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).