linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Eric Anholt" <eric@anholt.net>,
	"Maíra Canal" <mcanal@igalia.com>,
	"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"Doug Berger" <opendmb@gmail.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Stefan Wahren" <wahrenst@gmx.net>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings for BCM2712
Date: Thu, 19 Dec 2024 13:14:21 +0100	[thread overview]
Message-ID: <09bee93e-48bd-4a7c-b975-b10dce945d60@kernel.org> (raw)
In-Reply-To: <CAPY8ntCX8+yg1RFhAXu4ystGF_JivTh43RY=k2P0bUm5JxvzRA@mail.gmail.com>

On 19/12/2024 12:54, Dave Stevenson wrote:
> Hi Krzysztof
> 
> On Thu, 19 Dec 2024 at 08:42, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Wed, Dec 18, 2024 at 02:48:33PM +0000, Dave Stevenson wrote:
>>> Commit 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
>>> added the compatible string for BCM2712, but missed out that
>>> the number of interrupts and clocks changed too, and both need to be
>>> named.
>>>
>>> Update to validate clock, interrupts, and their names for the variants.
>>>
>>> Fixes: 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
>>> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
>>> ---
>>>  .../bindings/display/brcm,bcm2835-hvs.yaml         | 84 ++++++++++++++++++----
>>>  1 file changed, 70 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
>>> index f91c9dce2a44..fd25ee5ce301 100644
>>> --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
>>> +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
>>> @@ -20,11 +20,20 @@ properties:
>>>      maxItems: 1
>>>
>>>    interrupts:
>>> -    maxItems: 1
>>> +    minItems: 1
>>> +    maxItems: 3
>>> +
>>> +  interrupt-names:
>>> +    minItems: 1
>>> +    maxItems: 3
>>>
>>>    clocks:
>>> -    maxItems: 1
>>> -    description: Core Clock
>>> +    minItems: 1
>>> +    maxItems: 2
>>> +
>>> +  clock-names:
>>> +    minItems: 1
>>> +    maxItems: 2
>>>
>>>  required:
>>>    - compatible
>>> @@ -33,17 +42,64 @@ required:
>>>
>>>  additionalProperties: false
>>>
>>> -if:
>>> -  properties:
>>> -    compatible:
>>> -      contains:
>>> -        enum:
>>> -          - brcm,bcm2711-hvs
>>> -          - brcm,bcm2712-hvs
>>> -
>>> -then:
>>> -  required:
>>> -    - clocks
>>> +allOf:
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: brcm,bcm2711-hvs
>>> +
>>> +    then:
>>> +      properties:
>>> +        clocks:
>>> +          items:
>>> +            - description: Core Clock
>>> +        interrupts:
>>> +          maxItems: 1
>>
>>
>> clock-names and interrupt-names: false, unless driver needs them but all
>> this should be explained in the commit msg because it would be a change
>> to the binding.
> 
> False it is then.
> 
> Is there actually a full guide to binding requirements?
> https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-schema.html
> is the closest I've found, but it doesn't obviously cover these types
> of things.
> 
>>> +
>>> +      required:
>>> +        - clocks
>>> +
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: brcm,bcm2712-hvs
>>> +
>>> +    then:
>>> +      properties:
>>> +        clocks:
>>> +          minItems: 2
>>> +          maxItems: 2
>>> +        clock-names:
>>> +          items:
>>> +            - const: core
>>> +            - const: disp
>>> +        interrupts:
>>> +          items:
>>> +            - description: Channel 0 End of frame
>>> +            - description: Channel 1 End of frame
>>> +            - description: Channel 2 End of frame
>>> +        interrupt-names:
>>> +          items:
>>> +            - const: ch0-eof
>>> +            - const: ch1-eof
>>> +            - const: ch2-eof
>>> +      required:
>>> +        - clocks
>>> +        - clock-names
>>> +        - interrupt-names
>>
>> My previous comment still stands. Reply to people's feedback instead of
>> ignoring it.
> 
> Your previous comment was
> "Why requiring last two names? Commit msg does not explain that."
> 
> I didn't ignore it. The driver needs them, and the commit msg states

Uh, so someone added undocumented ABI. How this passed any checks? Or no
one cared to run validation?


> " but missed out that the number of interrupts and clocks changed too,
> and *both need to be
> named*.

Ah, I really did not get this.

> Update to validate clock, interrupts, and *their names* for the variants."

Please say explicitly that since some commit driver needs this. There
should be a clear reason in the commit msg why you are adding this ABI.


Best regards,
Krzysztof


  reply	other threads:[~2024-12-19 12:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 14:48 [PATCH v4 0/3] drm/vc4: Fixup DT and DT binding issues from recent patchset Dave Stevenson
2024-12-18 14:48 ` [PATCH v4 1/3] dt-bindings: display: bcm2711-hdmi: Add interrupt details for BCM2712 Dave Stevenson
2024-12-19  8:38   ` Krzysztof Kozlowski
2024-12-18 14:48 ` [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings " Dave Stevenson
2024-12-19  8:41   ` Krzysztof Kozlowski
2024-12-19 11:54     ` Dave Stevenson
2024-12-19 12:14       ` Krzysztof Kozlowski [this message]
2024-12-19 12:18         ` Dave Stevenson
2024-12-18 14:48 ` [PATCH v4 3/3] dt-bindings: interrupt-controller: brcm,bcm2836-l1-intc: Drop interrupt-controller requirement Dave Stevenson
2024-12-18 17:30   ` Florian Fainelli

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=09bee93e-48bd-4a7c-b975-b10dce945d60@kernel.org \
    --to=krzk@kernel.org \
    --cc=airlied@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=opendmb@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=robh@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=simona@ffwll.ch \
    --cc=tglx@linutronix.de \
    --cc=tzimmermann@suse.de \
    --cc=wahrenst@gmx.net \
    /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).