Re: [PATCH v3 0/2] rtc: pcf2127: make battery switch-over configurable

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

 



Hello,

On 11/11/2024 16:41:42+0100, Philipp Rosenberger wrote:
> 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.
> 

This has been discussed multiple times in the past, we can't have a DT
property for this as we need to be able to change it at runtime. There
is already a userspace interface to do this.

Below is my current patch for this that has been tested on pcf2127. I
didn't send it yet because we are losing information when switching from
standard or direct mode to disabled because when BSM is disabled, there
is no configuration where battery low detection function is enabled so
going from disabled to standard or direct will keep BLD disabled.

8<--------------------------------------------------------------------


[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