Re: [PATCH v13 06/11] iio: afe: rescale: make use of units.h

From: Andy Shevchenko
Date: Sat Feb 05 2022 - 13:24:12 EST


On Sat, Feb 5, 2022 at 7:47 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On Tue, 1 Feb 2022 14:28:28 -0500
> Liam Beguin <liambeguin@xxxxxxxxx> wrote:

...

> Not sure if it would help but maybe it's worth a local define
> of something like
>
> #define MULT9 1000000000LL
> to loose the association with any particular SI basis and
> just indicate it's a bit number being used to retain precision
> in some maths? Would need a comment to stop people sending
> patches to replace it with GIGA though ;)
>
> My ultimate preference here is for whatever works for Peter and
> Liam as the people who are mostly likely to have to deal
> with any changes to this driver in the future.

SI multipliers are for values with the physical meaning. While Peter
found them confusing, it's a pretty much win in my opinion when we
talk about data from nature. For the pure mathematical scale it may be
confusing.

--
With Best Regards,
Andy Shevchenko