Re: [PATCH v3 2/2] iio: dac: ad5706r: Add support for AD5706R DAC

From: Nuno Sá

Date: Wed Mar 25 2026 - 06:18:56 EST


On Wed, 2026-03-25 at 01:07 +0000, Torreno, Alexis Czezar wrote:
> > > > > Changes since v1:
> > > > >   - Removed PWM, GPIO, clock generator, debugfs, regmap,
> > > > > IIO_BUFFER
> > > >
> > > > Why was regmap removed?! Was it not used?
> > >
> > > As far as I understand it, regmap also gives access to debugfs. When I
> > > removed debugfs I also added regmap as removed.
> >
> > Not only debugfs, and it's unrelated to the any custom debugfs interfaces in
> > the driver, it's just a feature out-of-the-box of regmap.
> >
> > > For the spi write/read I am not using regmap as the device has some
> > > features that I think regmap_read/write couldn't support. Namely the
> > > variable data width, as the device only accepts exact amount of clock
> > > cycles. Future patches will also add variable SPI speed.
> >
> > We have a lot of flexibility in regmap core. Do you think it can be improved /
> > extended to cover the cases like yours?
> >
>
> To neatly summarize, my needs are: (in future patches)
> 1. SPI read/write can have different frequencies and runtime changeable
> 2. SPI data bits needs to be exactly 8bits or 16bits depending on register width
> 3. DAC Device reads SPI command bits [14:12] for communication, not just chip select
>
> For regmap to be used
> 1. regmap_config would need new read_speed and write_speed entries.
> 2. val_bits must now be changeable depending on the need.
> 3. I think the read/write_flag_mask can do this.
>

Do not forget you can just implement your custom regmap_bus which also opens new "doors".


- Nuno Sá