From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
"Tommaso Merciai" <tomm.merciai@gmail.com>,
"Martin Hecht" <mhecht73@gmail.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
"Alain Volmat" <alain.volmat@foss.st.com>,
"Jacopo Mondi" <jacopo+renesas@jmondi.org>,
"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Vladimir Zapolskiy" <vladimir.zapolskiy@linaro.org>,
"Dongchun Zhu" <dongchun.zhu@mediatek.com>,
"Paul Kocialkowski" <paul.kocialkowski@bootlin.com>,
"Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
"Todor Tomov" <todor.too@gmail.com>,
"Paul J. Murphy" <paul.j.murphy@intel.com>,
"Daniele Alessandrelli" <daniele.alessandrelli@gmail.com>,
"Marco Felsch" <kernel@pengutronix.de>,
"Lubomir Rintel" <lkundrak@v3.sk>,
linux-renesas-soc@vger.kernel.org,
"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] media: dt-bindings: i2c: Drop redundant endpoint properties
Date: Mon, 16 Mar 2026 19:02:41 +0100 [thread overview]
Message-ID: <138cc10a-b30a-4fcc-8401-ed8ac89ac04c@oss.qualcomm.com> (raw)
In-Reply-To: <abg7rvczKjyIA5jN@kekkonen.localdomain>
On 16/03/2026 18:19, Sakari Ailus wrote:
> Hi Krzysztof, Laurent,
>
> On Mon, Mar 16, 2026 at 03:42:09PM +0100, Krzysztof Kozlowski wrote:
>> On 16/03/2026 14:53, Laurent Pinchart wrote:
>>> Hello Krzysztof,
>>>
>>> Thank you for the patch.
>>>
>>> On Mon, Mar 16, 2026 at 02:45:34PM +0100, Krzysztof Kozlowski wrote:
>>>> The "endpoint" node references video-interfaces.yaml schema with
>>>> "unevaluatedProperties: false" which means that all properties from
>>>> referenced schema apply. Listing some of them with ": true" is simply
>>>> redundant and does not make this code easier to read.
>>>
>>> I think you know my opinion on this topic. I believe we would be better
>>> off by turning "unevaluatedProperties: false" into
>>> "additionalProperties: false" here, and keeping the list of applicable
>>> properties. It brings value to device tree authors by telling which
>>> properties are applicable to the device at hand. For instance ... (see
>>> below)
>>
>> (let me trim)
>>
>>>> diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5647.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5647.yaml
>>>> index 2d7937a372a2..7a05a1eda58d 100644
>>>> --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov5647.yaml
>>>> +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5647.yaml
>>>> @@ -51,9 +51,6 @@ properties:
>>>> $ref: /schemas/media/video-interfaces.yaml#
>>>> unevaluatedProperties: false
>>>>
>>>> - properties:
>>>> - clock-noncontinuous: true
>>>> -
>>>
>>> ... Without this, an integrator will need to dive into driver code to
>>> know if non-continuous clock is usable for the device.
>>
>> I see. Our usual interpretation of common schema, expressed by @Rob in
>> few places, that eventually all properties might be applicable. This
>> applies especially for ABI tied to the core Linux specifics, e.g.
>> rotation and orientation from video-interface-devices.yaml.
>>
>> Absolutely every sensor can be mounted rotated, therefore every binding
>> referencing video-interface-devices should allow it, even if driver is
>> not using it. Because basically that's the ABI we want to define for
>> each sensor, thus each binding referencing common schema should have
>> "unevaluatedProps: true" without listing them.
>>
>> Similarly touchscreen.yaml.
>>
>> OTOH, second option, properties which are strictly hardware, e.g. name
>> of power supply or whether clock has or has not non-continuous mode,
>> should be allowed only when they match the hardware. Such bindings
>> should use "additionalProperties: false" so the hardware description is
>> constrained/fixed/specific.
>
> The patch may be technically correct but I'm afraid it won't improve the
> bindings but rather the opposite: it removes information telling whether a
> property is relevant for a given device.
>
> I bet there are a lot of possibilities to write invalid DTS while the
> checker says it's fine (missing data-lanes or link-frequencies, for
> instance). That may have been the case before the patch but I'd make
> properties a driver needs to function mandatory rather than removing them
> from bindings altogether.
That's pretty different problem and I am not removing any mandatory
properties. I changed absolutely nothing from functional point of view.
>
> It'd been on my to-do list to split the current video-interfaces.yaml into
> several files: generic camera sensor properties, CSI-2 interface
> properties, DVP/Bt.656 interface properties and the rest (full list
> probably requires more thought). That way we could only include properties
> that are relevant for the device without necessarily listing each one for
> all bindings.
>
> I'd also continue to list boolean properties relevant for devices as well
> as other properties that are relevant for a device but not mandatory.
I don't think there is such goal and particular subsystem does not get
exception here. What is relevant for device comes either from the
hardware or implemented ABI, as I explained. Bindings arbitrarily
choosing "I think this might be relevant" from some big schema with
irrelevant pieces is not manageable and not correct.
The common schema should be rather entirely relevant thus making such
arbitrary choice what could be "more relevant" not even needed.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-03-16 18:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 13:45 [PATCH 1/2] media: dt-bindings: i2c: Drop redundant endpoint properties Krzysztof Kozlowski
2026-03-16 13:45 ` [PATCH 2/2] media: dt-bindings: " Krzysztof Kozlowski
2026-03-16 18:08 ` Krzysztof Kozlowski
2026-03-18 17:14 ` Laurent Pinchart
2026-03-16 13:53 ` [PATCH 1/2] media: dt-bindings: i2c: " Laurent Pinchart
2026-03-16 14:42 ` Krzysztof Kozlowski
2026-03-16 17:19 ` Sakari Ailus
2026-03-16 18:02 ` Krzysztof Kozlowski [this message]
2026-03-18 17:12 ` Laurent Pinchart
2026-03-26 14:03 ` 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=138cc10a-b30a-4fcc-8401-ed8ac89ac04c@oss.qualcomm.com \
--to=krzysztof.kozlowski@oss.qualcomm.com \
--cc=alain.volmat@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=daniele.alessandrelli@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=dongchun.zhu@mediatek.com \
--cc=geert+renesas@glider.be \
--cc=jacopo+renesas@jmondi.org \
--cc=kernel@pengutronix.de \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lkundrak@v3.sk \
--cc=magnus.damm@gmail.com \
--cc=mchehab@kernel.org \
--cc=mhecht73@gmail.com \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=paul.j.murphy@intel.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=quentin.schulz@theobroma-systems.com \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sre@kernel.org \
--cc=todor.too@gmail.com \
--cc=tomm.merciai@gmail.com \
--cc=vladimir.zapolskiy@linaro.org \
/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