devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Frank Li <Frank.li@nxp.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: dt: writing-schema: Describe defining properties in top-level
Date: Fri, 5 Sep 2025 08:49:01 +0200	[thread overview]
Message-ID: <8fe9ccd9-ec66-4174-896e-01501b8ad8ec@linaro.org> (raw)
In-Reply-To: <aLmwk/0gqrivgl1U@lizhi-Precision-Tower-5810>

On 04/09/2025 17:30, Frank Li wrote:
>> diff --git a/Documentation/devicetree/bindings/writing-schema.rst b/Documentation/devicetree/bindings/writing-schema.rst
>> index 470d1521fa17..e0859094575d 100644
>> --- a/Documentation/devicetree/bindings/writing-schema.rst
>> +++ b/Documentation/devicetree/bindings/writing-schema.rst
>> @@ -165,6 +165,14 @@ The YAML Devicetree format also makes all string values an array and scalar
>>  values a matrix (in order to define groupings) even when only a single value
>>  is present. Single entries in schemas are fixed up to match this encoding.
>>
>> +When bindings cover multiple similar devices that differ in some properties,
>> +those properties should be constrained for each device. This usually means:
>> +
>> + * In top level 'properties' define the property with the broadest constraints.
>> + * In 'if:then:' blocks, further narrow the constraints for those properties.
>> + * Do not define the properties within an 'if:then:' block (note that
>> +   'additionalItems' also won't allow that).
>> +
> 
> I can understand what your said. I think it would be better if add some
> simple examples.
Example for that is already there - at the bottom of this file.

Best regards,
Krzysztof

  reply	other threads:[~2025-09-05  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 14:24 [PATCH] docs: dt: writing-schema: Describe defining properties in top-level Krzysztof Kozlowski
2025-09-04 15:30 ` Frank Li
2025-09-05  6:49   ` Krzysztof Kozlowski [this message]
2025-09-05 14:35     ` Frank Li
2025-09-09 15:06 ` Rob Herring (Arm)

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=8fe9ccd9-ec66-4174-896e-01501b8ad8ec@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=Frank.li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.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;
as well as URLs for NNTP newsgroup(s).