Re: [PATCH 3/3] iio: dac: ad3530r: Add support for AD3532R/AD3532
From: Nuno Sá
Date: Thu Jun 11 2026 - 08:31:46 EST
On Thu, Jun 11, 2026 at 07:04:37AM +0000, Paller, Kim Seer wrote:
> > > @@ -445,7 +704,7 @@ static int ad3530r_setup(struct ad3530r_state *st,
> > > int external_vref_uV) static const struct regmap_config
> > ad3530r_regmap_config = {
> > > .reg_bits = 16,
> > > .val_bits = 8,
> > > - .max_register = AD3530R_MAX_REG_ADDR,
> > > + .max_register = AD3532R_MAX_REG_ADDR,
> >
> > What happens if we read off the end (via debugfs) for the smaller parts?
>
> I tested reading registers at 0x1000 and above on AD3531R it just
> returns 0xFF and no crash. Should I add a per-chip regmap_config to limit
> the exposed register space?
Personally, that would make sense to me.
- Nuno Sá
>
> > > };
> > >
> > > static const struct iio_info ad3530r_info = { @@ -514,6 +773,8 @@
> > > static const struct spi_device_id ad3530r_id[] = {
> > > { "ad3530r", (kernel_ulong_t)&ad3530r_chip },
> > > { "ad3531", (kernel_ulong_t)&ad3531_chip },
> > > { "ad3531r", (kernel_ulong_t)&ad3531r_chip },
> > > + { "ad3532", (kernel_ulong_t)&ad3532_chip },
> > > + { "ad3532r", (kernel_ulong_t)&ad3532r_chip },
> >
> > Add a precursor patch to switch this to named initializers. Otherwise this will
> > clash with the work Uwe is doing to ensure these are all done that way.
> >
> > > { }
> > > };
> > > MODULE_DEVICE_TABLE(spi, ad3530r_id); @@ -523,6 +784,8 @@ static
> > > const struct of_device_id ad3530r_of_match[] = {
> > > { .compatible = "adi,ad3530r", .data = &ad3530r_chip },
> > > { .compatible = "adi,ad3531", .data = &ad3531_chip },
> > > { .compatible = "adi,ad3531r", .data = &ad3531r_chip },
> > > + { .compatible = "adi,ad3532", .data = &ad3532_chip },
> > > + { .compatible = "adi,ad3532r", .data = &ad3532r_chip },
> > > { }
> > > };
> > > MODULE_DEVICE_TABLE(of, ad3530r_of_match);
> > >
>