On 26/06/2017 at 11:51:13 +0200, Fabien Lahoudere wrote:
> > 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.

> > 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to