From: Krzysztof Kozlowski <krzk@kernel.org>
To: Markus Probst <markus.probst@posteo.de>
Cc: "Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Lee Jones" <lee@kernel.org>, "Pavel Machek" <pavel@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
platform-driver-x86@vger.kernel.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v8 1/2] dt-bindings: embedded-controller: Add synology microp devices
Date: Thu, 23 Apr 2026 11:38:37 +0200 [thread overview]
Message-ID: <0e7020cd-361e-4f9c-a120-ee093beea10f@kernel.org> (raw)
In-Reply-To: <33e04947d6d55035fe310935281a4f0b9e87ae08.camel@posteo.de>
On 21/04/2026 18:25, Markus Probst wrote:
>>
>> Not true. You have enum and min/maxItems. There is no such syntax for
>> compatibles. I repeat.
>>
>> Instead of just blindly disagreeing and saying "I did that", point me to
>> example-schema having compatibles with min/maxItems.
> It is supposed to minimize the schema, otherwise
>
> - minItems: 3
> maxItems: 3
> items:
> enum:
> - synology,ds223j-microp
> - synology,ds124-microp
> - synology,ds118-microp
>
> would have been
>
> - items:
> - const: synology,ds223j-microp
> - const: synology,ds124-microp
> - const: synology,ds118-microp
>
> - items:
> - const: synology,ds124-microp
> - const: synology,ds223j-microp
> - const: synology,ds118-microp
>
> - items:
> - const: synology,ds118-microp
> - const: synology,ds223j-microp
> - const: synology,ds124-microp
Only one device is the fallback for given groyp, not each of them.
There is no such syntax in the kernel, nowhere. Please do not invent own
stuff.
> .
>
> In the case of dts validation, this is the same, with the exception of
> allowing any order. See below why the order does not matter.
>
> And yes, the example schema didn't use min/maxItems.
Yep. It is also explained why in writing-bindings - list is STRICTLY
ordered. Not flexible. And example reflects that. BTW, other bindings as
well, so recent EC patches is good way to learn:
(although I understand that in-tree patches do not cover your case)
https://lore.kernel.org/all/20260327-add-driver-for-ec-v7-1-7684c915e42c@oss.qualcomm.com/
from:
https://lore.kernel.org/all/?q=dfn%3Abindings%2Fembedded-controller%2F
>>
>>
>>
>>>
>>>
>>> Other sources suggest, I should add fallbacks that are less specific
>>
>> That's not really discussed here. It all looks like some random schema
>> and considering amount of LLM flying on the lists I have now doubts.
> I am not using an LLM for coding. But it is the first device tree
> schema I try to write.
>>
>> You need specific compatibles.
>> ...
>>
>>>
>>> If thisisn't fine either, replying to my previous message would
>>> probably the most efficient way to move forward [1].
>>
>>
>>>
>>>>
>>>>> + items:
>>>>> + enum:
>>>>
>>>> No, why the list is randomly ordered.
>>
>> Look here
> Was answered below. They have the exactly same known feature set, thus
> the order does not matter. i. e. there is no known difference.
>
>>
>>>>
>>>>> + - synology,ds923p-microp
>>>>> + - synology,ds1522p-microp
>>>>
>>>> And fallback, whichever is that, is not documented alone.
>>>>
>>>>> + - minItems: 4
>>>>> + maxItems: 4
>>>
>>> Those are devices with the exactly same known feature set.
>>> i. e. ds1522p can act as a fallback for ds923p, and ds923p could act as
>>> a fallback for ds1522p.
>>
>> You are not responding to actual comments. Lets focus ONLY on above
>> list. ONLY. Point me, where did you document the fallback to be used
>> alone? First of course, define what is the fallback.
> In this schema, I defined ds923p as fallback for ds1522p, and ds1522p
You did not define ds923p as fallback. It is used as front compatible as
well. Fallback cannot be used in some contexts at front:
+ items:
+ enum:
+ - synology,ds923p-microp
+ - synology,ds1522p-microp
> as fallback for ds923p. There was no separation of front and fallback
> until now. See below.
>
>>
>> None of this matches example schema or any other bindings, none of this
>> produces correct constraints for correct DTS.
>>
>> You need a defined enum of fallbacks and several lists for specific
>> fallback+front, like many other bindings in kernel.
> So now I can imagine what schema you want to see.
>
> i. e.
> - items:
> - enum:
> - front1
> - front2
> - front3
> - const: fallback1
> - items:
> - enum:
> - front4
> - front5
> - front6
> - const: fallback2
> - enum:
> - fallback1
> - fallback2
Yes
>
> But I am unsure how to determine which devices are the fallback and
> which are the front devices, given some of them have the same feature
> set. The oldest device as fallback each?
You can open your v1 or other versions. They were quite clear about
fallback: it did not matter for you which device is used as fallback at
v1, because you treated each device as the same programming model. I
assume you treated them the same, because you did not know the
differences (which is fine), so it should not matter that much now.
If unsure, choose oldest device, less features or eventually smallest
number.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-04-23 9:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 14:24 [PATCH v8 0/2] Introduce Synology Microp driver Markus Probst
2026-04-20 14:24 ` [PATCH v8 1/2] dt-bindings: embedded-controller: Add synology microp devices Markus Probst
2026-04-21 7:07 ` Krzysztof Kozlowski
2026-04-21 14:50 ` Markus Probst
2026-04-21 15:32 ` Krzysztof Kozlowski
2026-04-21 16:25 ` Markus Probst
2026-04-23 9:38 ` Krzysztof Kozlowski [this message]
2026-04-20 14:24 ` [PATCH v8 2/2] platform: Add initial synology microp driver Markus Probst
2026-04-21 11:59 ` Ilpo Järvinen
2026-04-21 14:17 ` Markus Probst
2026-04-21 14:58 ` Miguel Ojeda
2026-04-21 18:10 ` Ilpo Järvinen
2026-04-21 18:20 ` Markus Probst
2026-04-21 18:36 ` Ilpo Järvinen
2026-04-21 18:46 ` Miguel Ojeda
2026-04-22 13:48 ` FUJITA Tomonori
2026-04-21 15:33 ` Krzysztof Kozlowski
2026-04-21 16:29 ` Markus Probst
2026-04-20 15:55 ` [PATCH v8 0/2] Introduce Synology Microp driver Markus Probst
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=0e7020cd-361e-4f9c-a120-ee093beea10f@kernel.org \
--to=krzk@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=dakr@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=markus.probst@posteo.de \
--cc=ojeda@kernel.org \
--cc=pavel@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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