On Mon, May 11, 2020 at 11:11:27AM -0500, Rob Herring wrote: > On Mon, 11 May 2020 16:05:04 +0200, Kamel Bouhara wrote: > > Describe the devicetree binding for the Microchip TCB module. > > Each counter blocks exposes three independent counters. > > > > However, when configured in quadrature decoder, both channel <0> and <1> > > are required for speed/position and rotation capture (yet only the > > position is captured). > > > > Signed-off-by: Kamel Bouhara <kamel.bouhara@xxxxxxxxxxx> > > --- > > .../soc/microchip/atmel,at91rm9200-tcb.yaml | 29 +++++++++++++++++-- > > 1 file changed, 26 insertions(+), 3 deletions(-) > > > Hello Rob, > > My bot found errors running 'make dt_binding_check' on your patch: > I upgraded to dtschema-2020.6.dev4 and still the duplicate key issue isn't detected. I guess having the way I described two examples using the same node isn't right ? Thanks, Kamel > Traceback (most recent call last): > File "/usr/local/bin/dt-doc-validate", line 64, in <module> > ret = check_doc(args.yamldt) > File "/usr/local/bin/dt-doc-validate", line 25, in check_doc > testtree = dtschema.load(filename, line_number=line_number, duplicate_keys=False) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 592, in load > return yaml.load(f.read()) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py", line 343, in load > return constructor.get_single_data() > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data > return self.construct_document(node) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 123, in construct_document > for _dummy in generator: > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map > value = self.construct_mapping(node) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping > return BaseConstructor.construct_mapping(self, node, deep=deep) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping > if self.check_mapping_key(node, key_node, mapping, key, value): > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key > raise DuplicateKeyError(*args) > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping > in "<unicode string>", line 4, column 1 > found duplicate key "examples" with value "[]" (original value: "[]") > in "<unicode string>", line 157, column 1 > > To suppress this check see: > http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys > > Duplicate keys will become an error in future releases, and are errors > by default when using the new API. > > Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.example.dts' failed > make[1]: *** [Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.example.dts] Error 1 > make[1]: *** Waiting for unfinished jobs.... > Traceback (most recent call last): > File "/usr/local/bin/dt-mk-schema", line 34, in <module> > schemas = dtschema.process_schemas(args.schemas, core_schema=(not args.useronly)) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 554, in process_schemas > sch = process_schema(os.path.abspath(filename)) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 507, in process_schema > schema = load_schema(filename) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 123, in load_schema > return do_load(os.path.join(schema_basedir, schema)) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 108, in do_load > return yaml.load(tmp) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py", line 343, in load > return constructor.get_single_data() > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data > return self.construct_document(node) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 123, in construct_document > for _dummy in generator: > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map > value = self.construct_mapping(node) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping > return BaseConstructor.construct_mapping(self, node, deep=deep) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping > if self.check_mapping_key(node, key_node, mapping, key, value): > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key > raise DuplicateKeyError(*args) > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping > in "<unicode string>", line 4, column 1 > found duplicate key "examples" with value "[]" (original value: "[]") > in "<unicode string>", line 157, column 1 > > To suppress this check see: > http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys > > Duplicate keys will become an error in future releases, and are errors > by default when using the new API. > > Traceback (most recent call last): > File "/usr/local/bin/dt-mk-schema", line 34, in <module> > schemas = dtschema.process_schemas(args.schemas, core_schema=(not args.useronly)) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 554, in process_schemas > sch = process_schema(os.path.abspath(filename)) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 507, in process_schema > schema = load_schema(filename) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 123, in load_schema > return do_load(os.path.join(schema_basedir, schema)) > File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 108, in do_load > return yaml.load(tmp) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py", line 343, in load > return constructor.get_single_data() > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data > return self.construct_document(node) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 123, in construct_document > for _dummy in generator: > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map > value = self.construct_mapping(node) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping > return BaseConstructor.construct_mapping(self, node, deep=deep) > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping > if self.check_mapping_key(node, key_node, mapping, key, value): > File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key > raise DuplicateKeyError(*args) > ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping > in "<unicode string>", line 4, column 1 > found duplicate key "examples" with value "[]" (original value: "[]") > in "<unicode string>", line 157, column 1 > > To suppress this check see: > http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys > > Duplicate keys will become an error in future releases, and are errors > by default when using the new API. > > Documentation/devicetree/bindings/Makefile:41: recipe for target 'Documentation/devicetree/bindings/processed-schema-examples.yaml' failed > make[1]: *** [Documentation/devicetree/bindings/processed-schema-examples.yaml] Error 123 > make[1]: *** Deleting file 'Documentation/devicetree/bindings/processed-schema-examples.yaml' > Documentation/devicetree/bindings/Makefile:45: recipe for target 'Documentation/devicetree/bindings/processed-schema.yaml' failed > make[1]: *** [Documentation/devicetree/bindings/processed-schema.yaml] Error 123 > make[1]: *** Deleting file 'Documentation/devicetree/bindings/processed-schema.yaml' > Makefile:1300: recipe for target 'dt_binding_check' failed > make: *** [dt_binding_check] Error 2 > > See https://patchwork.ozlabs.org/patch/1287813 > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure dt-schema is up to date: > > pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade > > Please check and re-submit. > -- Kamel Bouhara, Bootlin Embedded Linux and kernel engineering https://bootlin.com