diff options
author | Bastian Krause <bst@pengutronix.de> | 2020-09-17 20:32:39 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-09-24 09:56:03 +0200 |
commit | 965fe1ceea05de735f63d1c1f90f0310fc830a8d (patch) | |
tree | 92c748dd8eda99d758cf0e2ed23e8476039292df /Documentation | |
parent | 35425bafc772ee189e3c3790d7c672b80ba65909 (diff) | |
download | linux-965fe1ceea05de735f63d1c1f90f0310fc830a8d.tar.gz linux-965fe1ceea05de735f63d1c1f90f0310fc830a8d.tar.bz2 linux-965fe1ceea05de735f63d1c1f90f0310fc830a8d.zip |
dt-bindings: rtc: let aux-voltage-chargeable supersede trickle-diode-disable
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.
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200917183246.19446-2-bst@pengutronix.de
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/rtc/rtc.yaml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml index ee237b2ed66a..6b8a11325691 100644 --- a/Documentation/devicetree/bindings/rtc/rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/rtc.yaml @@ -17,6 +17,15 @@ properties: $nodename: pattern: "^rtc(@.*|-[0-9a-f])*$" + aux-voltage-chargeable: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + description: | + Tells whether the battery/supercap of the RTC (if any) is + chargeable or not: + 0: not chargeable + 1: chargeable + quartz-load-femtofarads: $ref: /schemas/types.yaml#/definitions/uint32 description: @@ -35,6 +44,7 @@ properties: description: Do not use internal trickle charger diode. Should be given if internal trickle charger diode should be disabled. + deprecated: true trickle-resistor-ohms: $ref: /schemas/types.yaml#/definitions/uint32 |