Re: [RFC PATCH v4 1/3] i2c: rust: implement SMBus read abstraction via kernel::io::Io for I2cClient

Bruce Robertson <[email protected]>
Newsgroups org.kernel.vger.linux-i2c,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Jul 14, 2026 at 23:08:00 +0700, Muchamad Coirul Anwar wrote:
> Agreed. I will rework on top of Danilo's FallibleIoCapable approach
> in v5.

For the write side of that rework: I recently posted an RFC with a
Rust port of the SMB347 charger driver [1], which Igor pointed at this
series (thanks). I'm dropping my standalone SMBus helpers in favor of
your Io-based approach.

The SMB347 driver may be a useful early consumer for v5: unlike the
AS5600 it writes -- a config-unlock write plus read-modify-write
updates of charge-control register fields -- so it would exercise the
io_try_write/try_update paths that Igor noted are otherwise easy to
leave silently infallible. NACK and arbitration loss on a charger
config write are exactly the failures you don't want reported as
Ok(()).

Happy to rebase it onto v5 when it's out and report back.

Bruce

[1] https://lore.kernel.org/all/[email protected]/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.