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

From: Andy Shevchenko

Date: Sun Oct 25 2026 - 11:18:53 EST


On Sun, Oct 25, 2026 at 12:55:25AM -0500, Victor Chernyakin wrote:
> > > > 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.

Need a sign and having it in the data tables is different. Do you mean that min
of some ranges in your case are negative?

--
With Best Regards,
Andy Shevchenko