Linux RTC
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Juergen Borleis <jbe@pengutronix.de>
Cc: rtc-linux@googlegroups.com,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	jbe@pengutronix.de
Subject: [rtc-linux] Re: [PATCH v2] RTC/PCF85063: fix reading/setting time/date
Date: Wed, 24 Feb 2016 00:04:37 +0100	[thread overview]
Message-ID: <20160223230437.GC10681@piout.net> (raw)
In-Reply-To: <1455015447-13886-1-git-send-email-jbe@pengutronix.de>

On 09/02/2016 at 11:57:24 +0100, Juergen Borleis wrote :
> The PCF85063 RTC needs special treatment while setting or reading the
> time/date:
> 
>  - when reading the 7 time/date registers they are blocked from updating by
>    the 'one second' pulse internally. So reading all time/date registers
>    should happen in one turn to ensure reading is an atomic operation
> 
>  - to let setting the time/date be an atomic operation as well, the clock
>    dividers must be kept in reset state to avoid a 'one second' pulse during
>    writing the 7 time/date registers
> 
> Changes from v1:
> 
>  - using high level I2C access functions instead of the low level i2c_transfer()
>    to simplify the code
> 

All applied, thanks!

However, I found two interesting things in that driver. I'll send a
patch shortly, removing the useless century handling.
Also, I'm quite unsure about the year range handling. I have a patch but
I'm not sure about the RTC behaviour when the year goes from 99 to 00.
Can you check that works properly?

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android 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.

      parent reply	other threads:[~2016-02-23 23:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 10:57 [rtc-linux] [PATCH v2] RTC/PCF85063: fix reading/setting time/date Juergen Borleis
2016-02-09 10:57 ` [rtc-linux] [PATCH v2 1/3] RTC/PCF85063: simplify code to read the current time Juergen Borleis
2016-02-09 10:57 ` [rtc-linux] [PATCH v2 2/3] RTC/PCF85063: fix time/date reading Juergen Borleis
2016-02-09 10:57 ` [rtc-linux] [PATCH v2 3/3] RTC/PCF85063: fix time/date setting Juergen Borleis
2016-02-23 23:04 ` Alexandre Belloni [this message]

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=20160223230437.GC10681@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=jbe@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --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