[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2dd8bcd-1e23-4b68-b7b7-c01b034fc1fe@linaro.org>
Date: Wed, 17 Jan 2024 09:14:28 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Michal Simek <michal.simek@....com>, linux-kernel@...r.kernel.org,
monstr@...str.eu, michal.simek@...inx.com, git@...inx.com
Cc: Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Moritz Fischer <mdf@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Tom Rix <trix@...hat.com>, Wu Hao <hao.wu@...el.com>,
Xu Yilun <yilun.xu@...el.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"open list:FPGA MANAGER FRAMEWORK" <linux-fpga@...r.kernel.org>
Subject: Re: [PATCH v2] dt-bindings: fpga: Convert fpga-region binding to yaml
On 17/01/2024 09:07, Michal Simek wrote:
>>> +patternProperties:
>>> + "@(0|[1-9a-f][0-9a-f]*)$":
>>> + type: object
>>
>> You put (0|[...) to disallow @0001? I personally would not care, dtc
>> handles this, and the pattern is confusing. Just @[0-9a-z]+$
>
> This is actually taken from dtschema/schemas/simple-bus.yaml to allow all nodes
> with regs.
>
>>
>>> +
>>> + "^[^@]+$": true
>>
>> I dislike it. How is this binding supposed to be used? If in standalone
>> way, then you allow any property so what's the point of this schema? If
>> fpga-bridge.yaml is referenced by other device-specific binding, then
>> all properties will be evaluated here, so the same: you allow any property.
>>
>> Depending on the usage, this might be just like other generic, common
>> schemas, so end with "additionalPropeties: true".
>
> ok. I am fine with it.
But please verify my idea. If it is used standalone, then you should
drop both above patterns + additionalProps:false. If it is used as
generic schema referenced by something, then you could keep one pattern
for object, but actually it is redundant, so I propose to drop them and
additionalProps:true.
Best regards,
Krzysztof
Powered by blists - more mailing lists