Re: [PATCH v3 05/12] iio: dac: ad5686: add support for missing power supplies
From: Andy Shevchenko
Date: Tue Jun 16 2026 - 06:35:22 EST
On Tue, Jun 16, 2026 at 11:33:22AM +0200, Joshua Crofts wrote:
> On Tue, 16 Jun 2026 09:21:11 +0100
> Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@xxxxxxxxxx> wrote:
...
> > st->use_internal_vref = ret == -ENODEV;
> > st->vref_mv = st->use_internal_vref ? st->chip_info->int_vref_mv : ret / 1000;
> I'd use a macro from <linux/units.h> instead of just doing / 1000.
In this case we use (MICRO / MILLI) as we don't have (yet?) the
MILLIVOLTS_PER_VOLT and so on. Feeling like you want to add those?
...
> > + fsleep(5); /* power-up time */
>
> I'd recommend using a macro to define the sleep time, removing
> the need for a comment.
OTOH macro might hide the actual value. The comment is fine, but I would extend
it with a reference to a data sheet page, table, section, et cetera.
--
With Best Regards,
Andy Shevchenko