Re: [PATCH 0/2] Expand oscillator stop flag (OSF) validity check to ds1341
From: Alexandre Belloni
Date: Wed Jul 23 2025 - 17:26:00 EST
On Wed, 11 Jun 2025 11:14:14 -0700, Meagan Lloyd wrote:
> We would like to use CONFIG_RTC_HCTOSYS to sync a supercapacitor-backed
> DS1342 RTC to the kernel time early in boot. An obstacle is that the
> sync in rtc_hctosys() is unconditional as long as rtc_read_time()
> succeeds and in some power loss situations, our RTC comes up with either
> an unpredictable future time or the default 01/01/00 from the datasheet.
> Syncing a future time, followed by an NTP sync would not be desired as
> it would result in a backwards time jump. The sync feature is useful in
> boot scenarios where power is maintained so syncing only when the RTC
> data is valid would allow us to make use of the feature.
>
> [...]
Applied, thanks!
[1/2] rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe
https://git.kernel.org/abelloni/c/48458654659c
[2/2] rtc: ds1307: handle oscillator stop flag (OSF) for ds1341
https://git.kernel.org/abelloni/c/523923cfd5d6
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com