Re: [PATCH v5 2/8] iio: core: add fixed point parsing with 64-bit parts
From: Andy Shevchenko
Date: Mon Jan 26 2026 - 10:06:58 EST
On Mon, Jan 26, 2026 at 02:56:34PM +0000, Rodrigo Alencar wrote:
> On 26/01/26 01:49PM, Andy Shevchenko wrote:
> > On Fri, Jan 23, 2026 at 03:53:07PM +0000, Rodrigo Alencar via B4 Relay wrote:
...
> > > + * @integer: The integer part of the number
> > > + * @fract: The fractional part of the number
> >
> > Can we use struct s64_fract? (Yes, you would need to add a couple of lines into
> > math.h for that, but don't worry, I will Ack such a change immediately.)
>
> Sorry, I missed this. s64_fract would be declared as:
>
> struct s64_fract {
> __s64 numerator;
> __s64 denominator;
> };
>
> and numerator and denominator is not really applicable here. This type seems to be
> used to declare fractions.
Ah, good point. My memory (on fraction part) made a joke, I truly believed this
is the same what we need.
--
With Best Regards,
Andy Shevchenko