Re: [PATCH v1 2/2] iio: adc: ti-adc128s052: replace literal by unit expression
From: Jonathan Cameron
Date: Thu Jun 26 2025 - 14:22:52 EST
On Wed, 25 Jun 2025 20:57:37 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Jun 25, 2025 at 05:02:18PM +0000, Lothar Rubusch wrote:
> > Replace the literal number 1000 by MILLI from linux/units.h
>
> Yeah, but with this units (mV, uV, mA, uA) it would probably better to have
> dedicated definitions, like we have for Hz, s and maybe something else
> (bytes?).
I'm not that keen on us getting loads unit specific conversion factors.
From a code readability point of view (given my wish to avoid lots
and lots of unit specific defines) I'd favour using
MICRO / MILLI here and let the compiler resolve that to 1000
>