On Tue, Jul 28, 2020 at 1:34 AM Christian Eggers <ceggers@xxxxxxx> wrote: > > On Monday, 27 July 2020, 19:56:59 CEST, Rob Herring wrote: > > On Mon, Jul 27, 2020 at 4:05 AM Christian Eggers <ceggers@xxxxxxx> wrote: > > > Add missing semicolon. > > > > > > Signed-off-by: Christian Eggers <ceggers@xxxxxxx> > > > --- > > > > > > Documentation/devicetree/bindings/eeprom/at25.txt | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > At this point, I'd prefer to see this converted to schema instead of > > trivial fixes. Then the tooling will catch these syntax errors. > > > While trying to convert the at25 binding to yaml, I ran into the following problem: > > > Required properties: > > - compatible : Should be "<vendor>,<type>", and generic value "atmel,at25". > > > > Example "<vendor>,<type>" values: > > "anvo,anv32e61w" > > "microchip,25lc040" > > "st,m95m02" > > "st,m95256" > > The current binding uses arbitrary values for the compatible string, > only "atmel,at25" is really known by the driver. All other hardware related > settings are provided as separate properties. > > When I specify > > compatible: > enum: > - atmel,at25 > > I get an error in dt_binding_check: > > Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: eeprom@0: compatible: Additional items are not allowed ('atmel,at25' was unexpected) > Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: eeprom@0: compatible:0: 'st,m95256' is not one of ['atmel,at25'] > Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: eeprom@0: compatible: ['st,m95256', 'atmel,at25'] is too long > > How to handle this correctly? You can do: items: - {} - const: atmel,at25 But really, the possible compatible strings need to be listed out. See at24.yaml as it had similar issues IIRC. Rob