From: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com
Subject: [rtc-linux] Re: [PATCH 1/2] RTC: s35390a: handle invalid RTC time
Date: Tue, 04 Jul 2017 10:55:52 +0200 [thread overview]
Message-ID: <1499158552.6885.1.camel@collabora.co.uk> (raw)
In-Reply-To: <20170629075651.jqa3jvxfer56dvh5@piout.net>
On Thu, 2017-06-29 at 09:56 +0200, Alexandre Belloni wrote:
> 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.
>
In BLD section, datasheet says "When this flag is "1", be sure to initialize."
So I think we need those flags.
> > > 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.
> > >
>
>
--
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.
next prev parent reply other threads:[~2017-07-04 8:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 10:43 [rtc-linux] [PATCH 0/2] Improve low voltage or invalid time detection Fabien Lahoudere
2017-01-12 10:43 ` [rtc-linux] [PATCH 1/2] RTC: s35390a: handle invalid RTC time Fabien Lahoudere
2017-01-16 17:50 ` [rtc-linux] " Alexandre Belloni
2017-01-17 8:24 ` Fabien Lahoudere
2017-01-17 11:00 ` Alexandre Belloni
2017-06-26 9:51 ` Fabien Lahoudere
2017-06-29 7:56 ` Alexandre Belloni
2017-07-04 8:55 ` Fabien Lahoudere [this message]
2017-07-04 11:19 ` Alexandre Belloni
2017-01-12 10:43 ` [rtc-linux] [PATCH 2/2] RTC: s35390a: implement ioctls Fabien Lahoudere
2017-01-16 17:48 ` [rtc-linux] " Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499158552.6885.1.camel@collabora.co.uk \
--to=fabien.lahoudere@collabora.co.uk \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox