Re: [PATCH v4 6/6] iio: dac: ad5504: support scale via output-range-microvolt property

From: Andy Shevchenko

Date: Tue Aug 18 2026 - 04:37:46 EST


On Tue, Aug 18, 2026 at 04:23:47AM -0400, Taha Ed-Dafili wrote:
> On Mon, Aug 18, 2026 at 06:30:00AM +0300, Andy Shevchenko wrote:

...

> > So, the change from 1000 to MILLI is in the line that is changed
> > again in this patch. So, no need to change it earlier. And again, it
> > should be (MICRO / MILLI).
>
> I started the code with a bare / 1000, then replaced it with MILLI
> thinking it was the more readable form. I wasn't aware of the
> (MICRO / MILLI) idiom for expressing unit conversions explicitly.
> Will fix in v5 and drop the intermediate change from patch 5.

Since you want to get a millivolts from microvolts the 1000 is semantically
(MICRO / MILLI).

--
With Best Regards,
Andy Shevchenko