[PATCH v2 1/3] dt-bindings: rtc: pcf8523: add DSM pm option for battery switch-over

Alexandre Belloni alexandre.belloni at bootlin.com
Mon Jul 27 10:49:38 EDT 2020


On 27/07/2020 10:45:53+0100, Russell King - ARM Linux admin wrote:
> > This is but this shouldn't be a DT property as it has to be changed
> > dynamically. I'm working on an ioctl interface to change this
> > configuration.
> 
> Why does it need to be changed dynamically?  If the hardware components
> are not fitted to allow the RTC to be safely used without DSM, then
> why should userspace be able to disable DSM?

For RTCs with a standby mode, you want to be able to return to standby
mode.

That would happen for example after factory flashing in that common use
case:
 - the board is manufactured
 - Vbackup is installed, the RTC switches to standby mode
 - the board is then booted to flash a system, Vprimary is now present,
   the RTC switches to DSM.

At this point, if the board is simply shut down, the RTC will start
draining Vbackup before leaving the factory. Instead, we want to be able
to return to standby mode until the final user switches the product on
for the first time.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-arm-kernel mailing list