On Mon, Apr 06, 2020 at 02:32:47PM +0300, Laurent Pinchart wrote: > > > > + > > > > + clock-names: > > > > + items: > > > > + - const: iahb > > > > + - const: isfr > > > > + > > > > + interrupts: true > > > > + > > > > + ports: > > > > + type: object > > > > + description: | > > > > + This device has three video ports. Their connections are modelled using the > > > > + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. > > > > + Each port shall have a single endpoint. > > > > + > > > > + properties: > > > > + '#address-cells': > > > > + const: 1 > > > > + > > > > + '#size-cells': > > > > + const: 0 > > > > + > > > > + port@0: > > > > + type: object > > > > + description: Parallel RGB input port > > > > + > > > > + port@1: > > > > + type: object > > > > + description: HDMI output port > > > > + > > > > + port@2: > > > > + type: object > > > > + description: Sound input port > > > > + > > > > + required: > > > > + - port@0 > > > > + - port@1 > > > > + - port@2 > > > > + > > > > + additionalProperties: false > > Would it also make sense to use unevaluatedProperties here, and drop > #address-cells and #size-cells above as they're already evaluated in > synopsys,dw-hdmi.yaml ? Yup :) > > > > + > > > > + power-domains: > > > > + maxItems: 1 > > > > + > > > > +required: > > > > + - compatible > > > > + - reg > > > > + - clocks > > > > + - clock-names > > > > + - interrupts > > > > + - ports > > > > + > > > > +additionalProperties: false > > > > > > In the case where you have some kind of generic schema and then a more > > > specific one like you have here, unevaluatedProperties make more sense > > > that additionalProperties. > > > > > > additionalProperties checks that there are no extra properties on the > > > current schema, which is a problem here since you have to duplicate > > > the entire list of properties found in the generic schema, while > > > unevaluatedProperties checks that there are no extra properties in the > > > entire set of all schemas that apply to this node. > > > > > > This way, you can just put what is different from the generic schema, > > > and you don't have to keep it in sync. > > > > > > It's a feature that has been added in the spec of the schemas that > > > went on right after the one we support in the tools, so for now the > > > kernel meta-schemas only allows that property to be there (just like > > > deprecated) but won't do anything. > > > > > > This should be fixed quite soon however, the library we depend on > > > has started to work on that spec apparently. > > > > Should I postpone this series until support for unevaluatedProperties is > > available, to be able to test this ? > > Also, to make sure I understand this correctly, does it mean I can drop > "reg: true" and "interrupts: true" ? Ditto :) Maxime
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel