Re: [PATCH 3/3] iio: cdc: add Texas Instruments FDC1004 driver

From: Victor Chernyakin

Date: Sun Oct 25 2026 - 01:56:25 EST


> > > I'd look at using regmap even though you only have a single bus. It provides
> > > a rich set of helpers and the caching functionality that will save a bunch
> > > of bus traffic.
> >
> > Ah... is that a strong preference in new drivers? That would be quite
> > a bit of rewrite work...
>
> Yes, usually drivers start being looked cleaner. On top you got a few benefits
> of regmap for free (cache, debugfs, tracing, maybe even more).

Alright, v2 is now regmap-based!

> > > Looking at these data types, can you check if linear_range.h APIs
> > > can be applied instead?
> >
> > Doesn't look like they can, since they only work with unsigned int, but
> > these values are s64.
>
> The types in the software is a result, but what is the cause? Do you have
> ranges with a sign?

Yes, fdc1004_calibbias needs a sign.