Re: [PATCH v10 1/2] iio: adc: ltc2378: Add support for LTC2338-18

From: Andy Shevchenko

Date: Mon Aug 17 2026 - 03:33:22 EST


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>

...

> - 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...

--
With Best Regards,
Andy Shevchenko