mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: rtc-linux@googlegroups.com
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH v2] RTC/PCF85063: fix reading/setting time/date
Date: Tue,  9 Feb 2016 11:57:24 +0100	[thread overview]
Message-ID: <1455015447-13886-1-git-send-email-jbe@pengutronix.de> (raw)

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

Comments are welcome
Juergen

Please keep me on CC since I'm not subscribed to the list.

             reply	other threads:[~2016-02-09 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 10:57 Juergen Borleis [this message]
2016-02-09 10:57 ` [PATCH v2 1/3] RTC/PCF85063: simplify code to read the current time Juergen Borleis
2016-02-09 10:57 ` [PATCH v2 2/3] RTC/PCF85063: fix time/date reading Juergen Borleis
2016-02-09 10:57 ` [PATCH v2 3/3] RTC/PCF85063: fix time/date setting Juergen Borleis
2016-02-23 23:04 ` [PATCH v2] RTC/PCF85063: fix reading/setting time/date 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=1455015447-13886-1-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --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

all inboxes | Powered by JetHome®