Re: [PATCH v2 1/4] iio: dac: ad3530r: Refactor setup to table-driven register bank approach

From: Joshua Crofts

Date: Mon Jun 15 2026 - 03:22:39 EST


On Mon, 15 Jun 2026 14:20:15 +0800
Kim Seer Paller <kimseer.paller@xxxxxxxxxx> wrote:

> @@ -344,7 +387,14 @@ static const struct ad3530r_chip_info ad3530r_chip = {
> .name = "ad3530r",
> .channels = ad3530r_channels,
> .num_channels = ARRAY_SIZE(ad3530r_channels),
> - .sw_ldac_trig_reg = AD3530R_SW_LDAC_TRIG_A,
> + .sw_ldac_trig_reg = ad3530r_trigger_sw_ldac_reg,
> + .input_ch_reg = ad3530r_input_ch_reg,

You're overwriting this field below.

> + .interface_config_a = ad3530r_if_config,
> + .output_control = ad3530r_out_ctrl,
> + .reference_control = ad3530r_ref_ctrl,
> + .op_mode = ad3530r_op_mode,
> + .num_banks = ARRAY_SIZE(ad3530r_if_config),
> + .num_op_mode_regs = ARRAY_SIZE(ad3530r_op_mode),
> .input_ch_reg = ad3530r_input_ch_reg,

Slight issue, this will cause an error if compiled with W=1, as
you've already initialized this field earlier. Remove this line.


--
Kind regards

CJD