Re: [PATCH v7 02/11] iio: dac: mcp47feb02: Fix gain field initialization for active channels
From: Andy Shevchenko
Date: Fri Sep 18 2026 - 05:56:28 EST
On Fri, Sep 18, 2026 at 12:06:28PM +0300, Ariana Lazar wrote:
> As per MCP47FXBX48 Datasheet, in the format of the Gain Control and System
> Status Register each DAC channel has one bit to control its gain,
> starting at bit 8, while bits 0-7 contain status or unimplemented bits.
>
> The previous formula didn't initialize correctly all channels, being
> replaced by using field_get() with the already defined macro used in write
> operations where needed in the rest of the driver implementation.
> DAC_GAIN_MASK(i) extracts the gain control bit for each active channel
> correctly in one step.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko