Re: [PATCH v10 1/2] iio: adc: ltc2378: Add support for LTC2338-18
From: Jonathan Cameron
Date: Fri Aug 21 2026 - 22:20:29 EST
On Mon, 17 Aug 2026 10:28:21 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Thu, Aug 13, 2026 at 08:05:07PM -0300, Marcelo Schmitt wrote:
> > LTC2338-18 is similar to LTC2378-18, differentiating from the already
> > supported part mainly on the embedment of an internal voltage reference and
> > addition of a resistor divider network connected to the input signal path.
> > Extend the device driver, handling the internal reference and input signal
> > attenuation, enabling it to also support LTC2338-18.
>
> LGTM now,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Ah. I applied the earlier version fixing up at least comments it seems.
(Not that I've completely forgotten doing so!)
Can you please check if there is anything different we can handle
as a follow on patch?
Thanks,
Jonathan
>
> ...
>
> > - case IIO_CHAN_INFO_SCALE:
> > + case IIO_CHAN_INFO_SCALE: {
> > + struct u32_fract fract = st->info->internal_div;
>
> + blank line
>
> > *val = st->ref_uV / MILLI;
> > + if (fract.numerator && fract.denominator)
> > + *val = mult_frac(*val, fract.numerator, fract.denominator);
>
> He-he, I have a local patch to add mult_fract() macro for this kind of cases :-)
> Perhaps need to submit it at some point...
>