[PATCH v4 1/6] dt-bindings: i3c: Convert controller description to yaml

Miquel Raynal miquel.raynal at bootlin.com
Mon Jan 18 12:21:17 EST 2021


Hi Rob,

Just another question.

> > +patternProperties:
> > +  "^.*@[0-9a-f]+$":  
> 
> You can drop '^.*':
> 
> "@[0-9a-f]+$"

Here you advise to drop the beginning + wildcard of the regex matching
for I2C children, which indeed makes sense to me.

[...]

> > +  "^.*@[0-9a-f]+,[0-9a-f]+$":

Later in the file, we use another regex to match I3C devices. But here
if I drop ^.* from the regex, I get the following error:

schemas/i3c/i3c.yaml: ignoring, error in schema: patternProperties: @[0-9a-f]+,[0-9a-f]+$
<path>/i3c.yaml: patternProperties:@[0-9a-f]+,[0-9a-f]+$: 'oneOf' conditional failed, one must be fixed:
	Additional properties are not allowed ('properties', 'required' were unexpected)
	<path>/i3c.yaml: patternProperties:@[0-9a-f]+,[0-9a-f]+$: 'oneOf' conditional failed, one must be fixed:
		'enum' is a required property
		'const' is a required property
	Additional properties are not allowed ('properties', 'required', 'type' were unexpected)
	<path>/i3c.yaml: patternProperties:@[0-9a-f]+,[0-9a-f]+$: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
	'boolean' was expected

I can keep this extra "^.*" but I would like to understand the error
better because this does not look right.

Thanks,
Miquèl



More information about the linux-i3c mailing list