From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Tony Lindgren <tony@atomide.com>,
devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: hsi: hsi-client: convert to YAML
Date: Tue, 26 Mar 2024 13:56:22 +0100 [thread overview]
Message-ID: <1c6d995a-b1f1-48ca-b85c-f69071e7e3bb@linaro.org> (raw)
In-Reply-To: <hz4fbdix5yaz2wtdkjkf23pc3m4kbeavynvjagundqvv3bisor@lc7dev4667i5>
On 26/03/2024 13:45, Sebastian Reichel wrote:
>
>> but more importantly: some properties are now excluding each
>> other.
>
> I think that requirement was already there.
Right.
...
>>> +
>>> +allOf:
>>> + - if:
>>> + required:
>>> + - hsi-mode
>>> + then:
>>> + properties:
>>> + hsi-rx-mode: false
>>> + hsi-tx-mode: false
>>
>> I don't understand what you are trying to achieve here and with anyOf.
>> It looks like just oneOf. OTOH, old binding did not exclude these
>> properties.
>
> So the anyOf ensures, that either hsi-mode or hsi-rx-mode +
> hsi-tx-mode are specified. Those properties were previously
Not entirely. anyOf should succeed also when none of them are present,
which is not what you want in such case.
> listed as required and they are indeed mandatory by the Linux
> kernel implementation.
>
> The old binding also has this:
>
> hsi-mode: May be used ***instead*** hsi-rx-mode and hsi-tx-mode
>
> So it's either hsi-rx-mode + hsi-tx-mode OR hsi-mode, but not
> all properties at the same time. That's what the allOf ensures:
> if hsi-mode is specified, then hsi-rx-mode and hsi-tx-mode may
> not be specified.
Then wouldn't this work for you:
https://elixir.bootlin.com/linux/v5.17-rc2/source/Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml#L91
?
But if you really want them to be optional but excluding, then simpler
syntax is:
https://lore.kernel.org/all/20230118163208.GA117919-robh@kernel.org/
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-03-26 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 21:45 [PATCH 0/3] Convert MIPI HSI DT bindings to YAML Sebastian Reichel
2024-03-25 21:45 ` [PATCH 1/3] dt-bindings: hsi: hsi-client: convert " Sebastian Reichel
2024-03-26 7:18 ` Krzysztof Kozlowski
2024-03-26 12:45 ` Sebastian Reichel
2024-03-26 12:56 ` Krzysztof Kozlowski [this message]
2024-03-26 15:15 ` Sebastian Reichel
2024-03-26 16:08 ` Krzysztof Kozlowski
2024-03-25 21:45 ` [PATCH 2/3] dt-bindings: hsi: nokia-modem: " Sebastian Reichel
2024-03-26 7:21 ` Krzysztof Kozlowski
2024-03-26 13:00 ` Sebastian Reichel
2024-03-25 21:45 ` [PATCH 3/3] dt-bindings: hsi: omap-ssi: " Sebastian Reichel
2024-03-26 7:26 ` Krzysztof Kozlowski
2024-03-26 13:34 ` Sebastian Reichel
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=1c6d995a-b1f1-48ca-b85c-f69071e7e3bb@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=tony@atomide.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).