Re: [PATCH v10 1/2] iio: adc: ltc2378: Add support for LTC2338-18
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
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 <[email protected]> ... > - 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