diff mbox series

[v3,1/2] dt-bindings: rtc: pcf2127: Add nxp,battery-backed flag

Message ID 20241111154144.163604-2-p.rosenberger@kunbus.com
State Changes Requested
Headers show
Series rtc: pcf2127: make battery switch-over configurable | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Philipp Rosenberger Nov. 11, 2024, 3:41 p.m. UTC
This commit introduces the nxp,battery-backed property to the
nxp,pcf2127 Device Tree bindings. This flag indicates that the
RTC is battery-backed and forces the driver to enable the
battery switch-over function, but only if no other mode is already
configured.

With the PCF2131, the battery switch-over is disabled by default.
If the battery switch-over is not enabled by the bootloader or
firmware, this property ensures that the RTC can function correctly
when powered by the battery.

Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com>
---
 Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Herring (Arm) Nov. 12, 2024, 4:40 p.m. UTC | #1
On Mon, Nov 11, 2024 at 04:41:43PM +0100, Philipp Rosenberger wrote:
> This commit introduces the nxp,battery-backed property to the
> nxp,pcf2127 Device Tree bindings. This flag indicates that the
> RTC is battery-backed and forces the driver to enable the
> battery switch-over function, but only if no other mode is already
> configured.
> 
> With the PCF2131, the battery switch-over is disabled by default.
> If the battery switch-over is not enabled by the bootloader or
> firmware, this property ensures that the RTC can function correctly
> when powered by the battery.
> 
> Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com>
> ---
>  Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
> index 2d9fe5a75b06..87ba16346fb4 100644
> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
> @@ -30,6 +30,13 @@ properties:
>  
>    reset-source: true
>  
> +  nxp,battery-backed:
> +    description: |
> +      Indicates that the RTC is battery-backed. This property forces
> +      the driver to enable the battery switch-over function, but only if
> +      no other mode is already configured.
> +    $ref: /schemas/types.yaml#/definitions/flag

Seems like something that would be a common property? I didn't find any 
prior art though.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
index 2d9fe5a75b06..87ba16346fb4 100644
--- a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
+++ b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
@@ -30,6 +30,13 @@  properties:
 
   reset-source: true
 
+  nxp,battery-backed:
+    description: |
+      Indicates that the RTC is battery-backed. This property forces
+      the driver to enable the battery switch-over function, but only if
+      no other mode is already configured.
+    $ref: /schemas/types.yaml#/definitions/flag
+
 required:
   - compatible
   - reg