public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Markuss Broks <markuss.broks@gmail.com>,
	Daniel Mack <daniel@zonque.org>,
	Dillon Min <dillon.minfei@gmail.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: display: panel: use spi-peripheral-props.yaml
Date: Tue, 4 Oct 2022 16:57:11 +0200	[thread overview]
Message-ID: <1dcdc4e3-520c-3f6d-9994-9eedc2211c6d@linaro.org> (raw)
In-Reply-To: <YzwyT28hf7daYqa1@pendragon.ideasonboard.com>

On 04/10/2022 15:17, Laurent Pinchart wrote:
> Hi Krzysztof,
> 
> On Tue, Oct 04, 2022 at 03:10:29PM +0200, Krzysztof Kozlowski wrote:
>> On 04/10/2022 15:03, Laurent Pinchart wrote:
>>> On Tue, Oct 04, 2022 at 02:09:07PM +0200, Krzysztof Kozlowski wrote:
>>>> For devices connectable by SPI bus (e.g. already using
>>>> "spi-max-frequency" property), reference the "spi-peripheral-props.yaml"
>>>> schema to allow using all SPI device properties, even these which device
>>>> bindings author did not tried yet.
>>>
>>> Isn't this done implicitly by spi-controller.yaml ? SPI devices that are
>>> children of an SPI controller should match the patternProperties
>>> "^.*@[0-9a-f]+$" in that file, which has a $ref: spi-peripheral-props.yaml.
>>> Is there something I'm missing ?
>>
>> You are correct about one side of this - SPI controller bindings.
>> However these schemas here have clear: additional/unevaluatedProperties:
>> false, thus when they find DTS like:
>> panel@xxx {
>>   compatible = "one of these spi panels";
>>   ...
>>   spi-cs-high;
>>   spi-rx-delay-us = <50>;
>>   ... and some more from specific controllers
>> }
>>
>> you will get errors, because the panel schema does not allow them.
>>
>> The bindings were done (some time ago) in such way, that they require
>> that both SPI controller and SPI device reference spi-props.
> 
> You're absolutely right that additionalProperties needs to be replaced
> by unevaluatedProperties. Can the additions of $ref be dropped, or is
> that needed too ?

I just wrote above  - you need to reference the spi-props. Otherwise all
the SPI-related properties will be unknown/unevaluated.

Best regards,
Krzysztof


  reply	other threads:[~2022-10-04 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04 12:09 [PATCH] dt-bindings: display: panel: use spi-peripheral-props.yaml Krzysztof Kozlowski
2022-10-04 13:03 ` Laurent Pinchart
2022-10-04 13:10   ` Krzysztof Kozlowski
2022-10-04 13:17     ` Laurent Pinchart
2022-10-04 14:57       ` Krzysztof Kozlowski [this message]
2022-10-04 20:56       ` Rob Herring
2022-10-14 21:10 ` Rob Herring

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=1dcdc4e3-520c-3f6d-9994-9eedc2211c6d@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@zonque.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dillon.minfei@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markuss.broks@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox