Thread (11 messages) 11 messages, 2 authors, 2017-07-04

[rtc-linux] Re: [PATCH 1/2] RTC: s35390a: handle invalid RTC time

From: Alexandre Belloni <hidden>
Date: 2017-06-29 07:57:02

On 26/06/2017 at 11:51:13 +0200, Fabien Lahoudere wrote:
quoted
Actually, after reading the datasheet, I realize it is only POC that is
reset to 0 after reading so isinvalid is not needed. Just read status1
and look for BLD instead of caching it.
isinvalid is also used in s35390a_set_datetime. So if I remove it how can I detect that time setting
failed?
If it fails, simply don't reset BLD so it is still set when reading the
time.
quoted
I think it is probably worth separating s35390a_reset() into two
functions. One that does the initialization and another one that reads
status1 and immediately doest the initialization when POC is set. If BLD
is set, then we can wait for set_time to happen before initializing.
-- 
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help