public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] rtc: pcf2127: make battery switch-over configurable
@ 2024-11-11 15:41 Philipp Rosenberger
  2024-11-11 15:41 ` [PATCH v3 1/2] dt-bindings: rtc: pcf2127: Add nxp,battery-backed flag Philipp Rosenberger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Philipp Rosenberger @ 2024-11-11 15:41 UTC (permalink / raw)
  To: Alexandre Belloni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-rtc, linux-kernel, devicetree
  Cc: Lino Sanfilippo, Thomas Böhler, Hugo Villeneuve,
	Philipp Rosenberger

Hello,

This patch series adds the nxp,battery-backed device tree property to the
PCF2127 RTC driver. This flag indicates if the RTC is battery-backed, allowing
the driver to enable the battery switchover function if necessary.

Background
----------
The PCF2127 RTC driver currently supports the PCF2127, PCA2129, PCF2129, and
PCF2131 devices. Among these, only the newer PCF2131 has a different default
behavior for battery switchover: it is disabled by default, whereas it is
enabled on the other devices. If there is no firmware or bootloader setting
to enable battery switchover on the PCF2131, it will not automatically switch
to battery power, even if a battery is attached.

An alternative approach would be to enable battery switchover by default on
the PCF2131 without requiring a device tree property. However, this could be
undesirable, as it would make it impossible to disable battery
switchover.

Thank you.

Link [V2] https://patchwork.ozlabs.org/project/rtc-linux/list/?series=429144

Changes for V3:
- The nxp,battery-switch-over property was replaced with a boolean
  nxp,battery-backed flag
- The register vales are not encoded in the device tree any more
- The driver enables battery switch-over in standard mode if the dt flag
  is set.

Changes for V2:
- v1 was corrupted due to our company mail server settings. No functional
  changes have been made; this version is identical to v1.

Philipp Rosenberger (2):
  dt-bindings: rtc: pcf2127: Add nxp,battery-backed flag
  rtc: pcf2127: Add 'nxp,battery-switchover' DT property to enable
    battery switch-over

 .../devicetree/bindings/rtc/nxp,pcf2127.yaml  |  7 ++
 drivers/rtc/rtc-pcf2127.c                     | 76 +++++++++++++++----
 2 files changed, 68 insertions(+), 15 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-27 12:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 15:41 [PATCH v3 0/2] rtc: pcf2127: make battery switch-over configurable Philipp Rosenberger
2024-11-11 15:41 ` [PATCH v3 1/2] dt-bindings: rtc: pcf2127: Add nxp,battery-backed flag Philipp Rosenberger
2024-11-12 16:40   ` Rob Herring
2024-11-11 15:41 ` [PATCH v3 2/2] rtc: pcf2127: Add 'nxp,battery-switchover' DT property to enable battery switch-over Philipp Rosenberger
2024-11-11 18:27   ` Christophe JAILLET
2024-11-12 16:38   ` Rob Herring
2024-11-14  8:51 ` [PATCH v3 0/2] rtc: pcf2127: make battery switch-over configurable Alexandre Belloni
2024-11-27 12:58   ` Philipp Rosenberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox