[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16035c69-f283-ea40-5db2-d99d0e932fc1@linaro.org>
Date: Wed, 27 Jul 2022 21:27:54 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Conor.Dooley@...rochip.com, i.bornyakov@...rotek.ru,
mdf@...nel.org, hao.wu@...el.com, yilun.xu@...el.com,
trix@...hat.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, linux-fpga@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: fpga: microchip,mpf-spi-fpga-mgr: use
spi-peripheral-props.yaml
On 27/07/2022 18:57, Conor.Dooley@...rochip.com wrote:
> Hey Krzysztof,
>
> On 27/07/2022 17:43, Krzysztof Kozlowski wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> Instead of listing directly properties typical for SPI peripherals,
>> reference the spi-peripheral-props.yaml schema. This allows using all
>> properties typical for SPI-connected devices, even these which device
>> bindings author did not tried yet.
>>
>> Remove the spi-* properties which now come via spi-peripheral-props.yaml
>> schema, except for the cases when device schema adds some constraints
>> like maximum frequency.
>>
>> While changing additionalProperties->unevaluatedProperties, put it in
>> typical place, just before example DTS.
>
> This is probably just me missing something about dt-schema norms,
> but how come you added the $ref just above the example rather than
> above the properties list?
AFAIU, the location is purely by convention so far. allOf with refs go
before properties, but with "if:then" they go after required. This is a
bit confusing and causes unneeded code move when someone adds "if:" to
such allOf. Additionally the spi-peripheral-props.yaml ref is actually
not that important, unlike other refs (e.g. panels referencing
panel-common.yaml, watchdog -> watchdog.yaml).
Therefore for consistency with all other SPI slave devices I put it at
the end, but if you find it inconsistent/messing up, I can move it
before properties.
Best regards,
Krzysztof
Powered by blists - more mailing lists