Hi, On 09/01/2017 at 10:25:31 +0100, Fabien Lahoudere wrote : > I use a Seiko S35390A RTC that knows if the RTC has restarted when POC > value is set to 1. (POC is bit 0 of register status1). > In the current driver, the value is just ignored and lost in > s35390a_probe by calling s35390a_reset. > > I need this feature to check if the RTC time is valid or not at boot. > Is there a standard mechanism to store this information and check at > boot that the RTC is valid? >
With that RTC, there is no reliable way of knowing whether the time has been set since reset. You could handle one case by storing that you saw the POC bit high at some point and returning -EINVAL in read_time until the time is set by set_time. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.