Re: [PATCH v2] dt-bindings: fpga: Convert fpga-region binding to yaml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 1/17/24 09:14, Krzysztof Kozlowski wrote:
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.

additionalProperties: true works for me.

I was looking at how to describe cases where you have normal MMIO IP or also things like fixed-factor-clock without reg property. That's why I looked at simple-bus schema and took patterns from it. Not sure if there can be something else out of that patterns but if you fine with just permitting everything that's perfectly fine for me.

Thanks,
Michal




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux