Re: [PATCH v5 09/12] iio: dac: ad5686: add helpers to handle powerdown masks
From: Andy Shevchenko
Date: Mon May 04 2026 - 04:25:54 EST
On Fri, May 01, 2026 at 10:15:02AM +0100, Rodrigo Alencar via B4 Relay wrote:
> Add ad5686_pd_field_set() and ad5686_pd_field_get() helpers to cleanup
> powerdown mask control. Define AD5686_PD_* constants, like AD5686_PD_MSK
> to hold powerdown mask value for a single channel.
...
> +#define AD5686_PD_MSK GENMASK(1, 0)
> +
> +#define AD5686_PD_1K_TO_GND 0x1
> +#define AD5686_PD_PWR_UP 0x0
> +#define AD5686_PD_PWR_DOWN AD5686_PD_MSK
This doesn't look right (semantically). Use just an explicit value
#define AD5686_PD_PWR_DOWN 0x3
Also sort them by value in one way or the other.
With that being addressed,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko