Re: [PATCH v4 4/6] iio: dac: ad3530r: Refactor setup to table-driven register banks
From: Andy Shevchenko
Date: Fri Jul 03 2026 - 08:28:19 EST
On Fri, Jul 03, 2026 at 06:10:09PM +0800, Kim Seer Paller wrote:
> Devices with a multi-bank register map repeat the same configuration
> across several banks, which the hardcoded register addresses in
> ad3530r_setup() cannot cover.
>
> Move the addresses into per-chip arrays and add ad3530r_set_reg_bank_bits()
> and ad3530r_write_reg_banks() to apply an operation to every bank. Each
> current device has a single bank, so no functional change.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
...
> - int i, ret;
> u8 range_multiplier, val;
> + int ret;
> - for (i = 0; i < st->chip_info->num_channels; i++)
> + for (unsigned int i = 0; i < st->chip_info->num_channels; i++)
Strictly speaking this is separate change. But it's quite small, so I leave it
up to Jonathan to decide if needs to be split or okay to go as is.
--
With Best Regards,
Andy Shevchenko