Re: [RFC PATCH v7 0/4] iio: position: add Rust driver for ams AS5600

From: Muchamad Coirul Anwar

Date: Sun Nov 29 2026 - 10:40:23 EST


On Sun, 29 Nov 2026 at 06:59, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> > This series adds a Rust driver for the ams AS5600 12-bit magnetic rotary
> > position sensor. It also adds fallible I/O, SMBus access, and the IIO
> > abstractions needed by the driver. The driver exposes raw angle and scale
> > through IIO sysfs.
> >
> > Feedback on the I2C and IIO lifetimes, locking, and device teardown would
> > be appreciated.
> >
> > The Region-based view models byte-addressed registers and is not a
> > general model for command-indexed 16-bit registers. The standalone
> > word-read helpers accept any SMBus command byte.
> >
> > The current interface is intentionally limited while a Rust regmap
> > abstraction is unavailable. Feedback on whether this is an appropriate
> > interim approach, or whether the work should wait for regmap, would be
> > appreciated.
>
> Do we have any like timescale on regmap support?
>
> Long term I think things should go that way simply to avoid duplication.
> Given the rust bindings we have here are very strongly assuming a register
> interface regmap should in most cases probably replaces these.
>
> The irony is that I'd be much happier seeing an i2c only binding if it
> was for the many i2c devices that don't present a simple register interface.
>
> Note though that this stuff is effectively internal to the kernel so
> I wouldn't mind going forward with I2C register interface now and
> then flipping over to regmap and deprecating the I2C register interface
> later.
>

Hi Jonathan,

Thanks for allowing the interim I2C register interface for now. I agree
that regmap is the right direction long term, and I'm happy to migrate
AS5600 once Rust regmap support is available. I'll link this discussion
in the v8 cover letter as well.

Thanks,
Coirul

> Jonathan