From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Michael Walle <mwalle@kernel.org>
Cc: sashiko-reviews@lists.linux.dev, linux-rtc@vger.kernel.org
Subject: Re: [PATCH] rtc: pcf8563: add SMBus support
Date: Thu, 1 Oct 2026 23:44:12 +0200 [thread overview]
Message-ID: <2026100121441258ccde92@mail.local> (raw)
In-Reply-To: <DLTJ9BRUJFAO.XKH3SG306MBJ@kernel.org>
On 01/10/2026 15:24:07+0200, Michael Walle wrote:
> On Wed Sep 30, 2026 at 5:25 PM CEST, Alexandre Belloni wrote:
> >> Because of this fallback, when pcf8563_rtc_read_time() reads the time:
> >>
> >> drivers/rtc/rtc-pcf8563.c:pcf8563_rtc_read_time() {
> >> ...
> >> err = regmap_bulk_read(pcf8563->regmap, PCF8563_REG_ST1, buf,
> >> sizeof(buf));
> >> ...
> >> }
> >>
> >> The bulk read executes as a loop of separate single-byte SMBus reads instead
> >> of an atomic transaction. Since each SMBus byte transaction issues its own
> >> STOP condition, the RTC's internal register latch is released between reads.
> >>
> >> Does this allow the hardware time to roll over mid-read and result in
> >> corrupt time data?
> >
> > This is a valid concern, did you test?
>
> Yes, did you read my first reply? I'm not sure how this is handled
> in the RTC subsystem. Most regmap converted RTC should fall into
> this case. How do you propose to handle that? Instead of removing
> the check, we could just test for either I2C or SMBus block read.
For some reason, I didn't get you reply in my inbox. For the RTCs that
are not latching, we do read the sec register twice. I guess testing for
I2C or SMBus block read would make more sense here.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-10-01 21:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 11:30 [PATCH] rtc: pcf8563: add SMBus support Michael Walle
2026-09-30 11:40 ` sashiko-bot
2026-09-30 12:06 ` Michael Walle
2026-09-30 15:25 ` Alexandre Belloni
2026-10-01 13:24 ` Michael Walle
2026-10-01 21:44 ` 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=2026100121441258ccde92@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.