mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org,
	"Maciej W. Rozycki" <macro@orcam.me.uk>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" <linux-rtc@vger.kernel.org>
Subject: Re: [PATCH RFC] rtc: m41t80: Support SMBus adapters without I2C block transfers
Date: Tue, 17 Nov 2026 09:46:22 -0800	[thread overview]
Message-ID: <ccee564e-c705-4669-aef8-e0ed284fb776@gmail.com> (raw)
In-Reply-To: <20261103225027.1248035-1-f.fainelli@gmail.com>

On 11/3/26 14:50, Florian Fainelli wrote:
> The M41T81 on the Broadcom BCM91250E (Sentosa) is connected to the
> SiByte SMBus controller. The controller supports SMBus byte and word
> transactions, but not the I2C block transfers required by rtc-m41t80,
> so the driver refuses to probe.
> 
> Use the I2C core's block-read emulation and provide a byte-write
> fallback, retaining native block transfers when the adapter supports
> them. Propagate transfer errors and reject short reads.
> 
> Individual byte or word reads do not latch the complete clock register
> set. Recheck seconds after reading the time on adapters without block
> reads and retry up to three times if the clock rolled over. Return
> -EAGAIN if a consistent sample cannot be obtained.
> 
> Maciej W. Rozycki proposed SMBus-only support for this RTC family in
> 2008. The same SiByte limitation was discussed again in 2018, including
> register latching, seconds rechecks and a possible regmap conversion.
> This change revisits that approach using the current I2C helpers.
> 
> RTC access and date retention across a reboot were verified on a
> BCM91250E. Host tests with mocked SMBus transfers covered native and
> fallback paths, rollover retries, short reads and transfer errors.
> Alarm operation and retention after a power-cycle were not tested.
> 
> Link: https://lkml.rescloud.iu.edu/hypermail/linux/kernel/0805.1/1778.html
> Link: https://lkml.rescloud.iu.edu/1811.1/07408.html
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Maciej, Alexandre, any feedback on this approach?
-- 
Florian

      parent reply	other threads:[~2026-11-17 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 22:50 Florian Fainelli
2026-11-04  2:13 ` Maciej W. Rozycki
2026-11-17 17:46 ` Florian Fainelli [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=ccee564e-c705-4669-aef8-e0ed284fb776@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    /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®