Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas,rsnd: switch to yaml base Documentation

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

 



Hi Rob

> > From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> > 
> > This patch switches from .txt base to .yaml base Document.
> > It is still keeping detail explanations at .txt
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> > ---
(snip)
> > +  # For OF-graph
> > +  port:
> > +    description: OF-Graph subnode
> > +    $ref: "audio-graph-card.yaml#/definitions/port"
> 
> Something like this should work (at the top-level):
> 
> allOf:
>   - $ref: "audio-graph-card.yaml#

Hmm.. it will be error, see below (A).
How to solve it ??
(I will keep to use above style)

> > +# use patternProperties to avoid naming "xxx,yyy"
> > +patternProperties:
> > +  "^rcar_sound,dvc$":
> 
> None of these are patterns.

As always happen, "xxx,yyy" style will be error for me without patternProperties.
What is wrong ??

  "rcar_sound,dvc":
    description: DVC subnode.
    type: object
    patternProperties:
      "^dvc-[0-1]$":
        type: object
        properties:
          dmas:
            maxItems: 1
          dma-names:
            const: "tx"
        required:
          - dmas
          - dma-names
    additionalProperties: false


CHKDT   Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
/opt/4TSSD/morimoto/WORK/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml: properties:rcar_sound,dvc: {'description': 'DVC subnode.', 'type': 'object', 'patternProperties': {'^dvc-[0-1]$': {'type': 'object', 'properties': {'dmas': {'maxItems': 1}, 'dma-names': {'const': 'tx'}}, 'required': ['dmas', 'dma-names']}}, 'additionalProperties': False} is not valid under any of the given schemas (Possible causes of the failure):
        /opt/4TSSD/morimoto/WORK/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml: properties:rcar_sound,dvc: 'not' is a required property
        /opt/4TSSD/morimoto/WORK/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml: properties:rcar_sound,dvc:type: 'boolean' was expected

make[2]: *** [/opt/4TSSD/morimoto/WORK/linux/Documentation/devicetree/bindings/Makefile:19: Documentation/devicetree/bindings/sound/renesas,rsnd.example.dts] エラー 1
make[1]: *** [/opt/4TSSD/morimoto/WORK/linux/Makefile:1366: dt_binding_check] エラー 2
make: *** [/opt/4TSSD/morimoto/WORK/linux/Makefile:185: __sub-make] エラー 2



--- error (A) --------

  CHKDT   Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
Traceback (most recent call last):
  File "/home/morimoto/.local/bin//dt-doc-validate", line 67, in <module>
    ret = check_doc(f)
  File "/home/morimoto/.local/bin//dt-doc-validate", line 25, in check_doc
    testtree = dtschema.load(filename, line_number=line_number, duplicate_keys=False)
  File "/home/morimoto/.local/lib/python3.8/site-packages/dtschema/lib.py", line 602, in load
    return yaml.load(f.read())
  File "/home/morimoto/.local/lib/python3.8/site-packages/ruamel/yaml/main.py", line 343, in load
    return constructor.get_single_data()
  File "/home/morimoto/.local/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 113, in get_single_data
    return self.construct_document(node)
  File "/home/morimoto/.local/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 123, in construct_document
    for _dummy in generator:
  File "/home/morimoto/.local/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/home/morimoto/.local/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/home/morimoto/.local/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping
    if self.check_mapping_key(node, key_node, mapping, key, value):
  File "/home/morimoto/.local/lib/python3.8/site-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 "allOf" with value "[]" (original value: "{}")
  in "<unicode string>", line 268, 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.

make[2]: *** [/opt/4TSSD/morimoto/WORK/linux/Documentation/devicetree/bindings/Makefile:19: Documentation/devicetree/bindings/sound/renesas,rsnd.example.dts] エラー 1
make[1]: *** [/opt/4TSSD/morimoto/WORK/linux/Makefile:1366: dt_binding_check] エラー 2
make: *** [/opt/4TSSD/morimoto/WORK/linux/Makefile:185: __sub-make] エラー 2



[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