From: "Michael Walle" <mwalle@kernel.org>
To: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
<sashiko-reviews@lists.linux.dev>
Cc: <linux-rtc@vger.kernel.org>
Subject: Re: [PATCH] rtc: pcf8563: add SMBus support
Date: Thu, 01 Oct 2026 15:24:07 +0200 [thread overview]
Message-ID: <DLTJ9BRUJFAO.XKH3SG306MBJ@kernel.org> (raw)
In-Reply-To: <20260930152513dd617b74@mail.local>
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
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.
Anyway, I have an SMBus host controller which supports the block
read, thus it doesn't fall into the single byte read case.
-michael
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
next prev parent reply other threads:[~2026-10-01 13:24 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 [this message]
2026-10-01 21:44 ` 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=DLTJ9BRUJFAO.XKH3SG306MBJ@kernel.org \
--to=mwalle@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox