Re: [PATCH 1/8] dt-bindings: rtc: let aux-voltage-chargeable supersede trickle-diode-disable

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

 



On Mon, 07 Sep 2020 16:27:20 +0200, Bastian Krause wrote:
> Some RTCs can be equipped with a chargeable battery or supercap.
> Every RTC allowing this whose driver's implement it are charged by
> default. To disable this the trickle-diode-disable flag exists.
> 
> If a driver did not support charging and some time later one wants to
> add that feature, there is currently no way to do it without breaking
> dt backwards compatibility. RTCs on boards without the
> trickle-diode-disable flag in their device tree would suddenly charge
> their battery/supercap which is a change in behavior.
> 
> Change that by introducing aux-voltage-chargeable, not as a flag but as
> a uint32 enum allowing to set "do not charge" (0) or "charge" (1). This
> dt property is optional, so we can now distinguish these cases.
> 
> Care must be taken to support the old behavior for device trees without
> aux-voltage-chargeable nonetheless to stay compatible.
> 
> Suggested-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> Signed-off-by: Bastian Krause <bst@xxxxxxxxxxxxxx>
> ---
> In a previous series aux-voltage-chargeable was added as a ds1307 dt
> property. Discussions lead to turning that into a generic rtc dt
> property:
> https://lore.kernel.org/linux-rtc/98fa7181-3ebe-d7c3-cfac-fee841c81e15@xxxxxxxxxxxxxx/T/
> ---
>  Documentation/devicetree/bindings/rtc/rtc.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 


My bot found errors running 'make dt_binding_check' on your patch:

Traceback (most recent call last):
  File "/usr/local/bin/dt-extract-example", line 45, in <module>
    binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 343, in load
    return constructor.get_single_data()
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 111, in get_single_data
    node = self.composer.get_single_node()
  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 891, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.scanner.ScannerError: mapping values are not allowed in this context
  in "<unicode string>", line 25, column 24
make[1]: *** [Documentation/devicetree/bindings/Makefile:18: Documentation/devicetree/bindings/rtc/rtc.example.dts] Error 1
make[1]: *** Deleting file 'Documentation/devicetree/bindings/rtc/rtc.example.dts'
make[1]: *** Waiting for unfinished jobs....
./Documentation/devicetree/bindings/rtc/rtc.yaml:  mapping values are not allowed in this context
  in "<unicode string>", line 25, column 24
schemas/rtc/rtc.yaml: ignoring, error parsing file
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/rtc/rtc.yaml: ignoring, error parsing file
warning: no schema found in file: ./Documentation/devicetree/bindings/rtc/rtc.yaml
make: *** [Makefile:1366: dt_binding_check] Error 2


See https://patchwork.ozlabs.org/patch/1358937

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.




[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