devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Stanislav Jakubek <stano.jakubek@gmail.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: nvmem: sprd-efuse: convert to YAML
Date: Mon, 15 Jul 2024 09:15:26 +0200	[thread overview]
Message-ID: <fca65d4a-7e2a-47c8-809d-eac758433eb4@kernel.org> (raw)
In-Reply-To: <ZpOyEWwj/HwQv7n3@standask-GA-A55M-S2HP>

On 14/07/2024 13:10, Stanislav Jakubek wrote:
> On Sat, Jul 13, 2024 at 08:31:31PM +0200, Krzysztof Kozlowski wrote:
>> On 13/07/2024 14:12, Stanislav Jakubek wrote:
> 
> [snip]
> 
>>> +allOf:
>>> +  - $ref: nvmem.yaml#
>>> +  - $ref: nvmem-deprecated-cells.yaml#
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: sprd,ums312-efuse
>>> +    then:
>>> +      required:
>>> +        - clocks
>>> +        - clock-names
>>> +    else:
>>> +      properties:
>>> +        clocks: false
>>> +        clock-names: false
>>
>> Half of the binding is this "if:", so I would say they are not that
>> similar. I think it would be easier to read them if these were split
>> into two bindings.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Hi Krzysztof,
> 
> pretty much this exact if-then-else is described in the "Writing Devicetree
> Bindings in json-schema" documentation as a "typical case" for its usage, so
> I went with that. I think that it's simple enough that it only minimally
> hampers readability.

Example schema has a lot of stuff shown, because it is example...

> 
> I admit that there might be some confusion, since I forgot to include an
> example for the sprd,ums312-efuse (i.e. with clocks and clock-names).
> Could I just add this example in V2 and keep it as-is otherwise?

Usually one example per binding is enough, if devices differ by one
property.


Best regards,
Krzysztof


      reply	other threads:[~2024-07-15  7:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-13 12:12 [PATCH] dt-bindings: nvmem: sprd-efuse: convert to YAML Stanislav Jakubek
2024-07-13 12:24 ` Stanislav Jakubek
2024-07-13 18:31 ` Krzysztof Kozlowski
2024-07-14 11:10   ` Stanislav Jakubek
2024-07-15  7:15     ` Krzysztof Kozlowski [this message]

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=fca65d4a-7e2a-47c8-809d-eac758433eb4@kernel.org \
    --to=krzk@kernel.org \
    --cc=baolin.wang7@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stano.jakubek@gmail.com \
    --cc=zhang.lyra@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;
as well as URLs for NNTP newsgroup(s).