[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c6d995a-b1f1-48ca-b85c-f69071e7e3bb@linaro.org>
Date: Tue, 26 Mar 2024 13:56:22 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Tony Lindgren <tony@...mide.com>,
devicetree@...r.kernel.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: hsi: hsi-client: convert to YAML
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
Powered by blists - more mailing lists