Re: [PATCH v3 2/2] iio: dac: ad5706r: Add support for AD5706R DAC
From: Nuno Sá
Date: Wed Mar 25 2026 - 06:14:59 EST
On Wed, 2026-03-25 at 03:13 +0000, Torreno, Alexis Czezar wrote:
> > > > + ret = spi_sync_transfer(st->spi, xfer, ARRAY_SIZE(xfer));
> > >
> > > Can you use spi_write_the_read()?
> > > Has the added advantage that it bounces the data so doesn't need DMA safe.
> > > Can also use more meaningful types like
> > > __be16 tx;
> > > __be16 rx16;
> > > u8 rx8;
> >
> > Ok, will shift to spi_write_the_read(). There was another place to use this
> > above, just trimmed it off here. Noted on the more meaningful variables.
> >
>
> I only just checked spi_write_then_read() but, it seems this doesn't support
> variable spi_speed_frequency for my future patches. Should I still use it for now
> and revert in the future?
There's still the open regmap discussion. Independent of that, if you can't use
spi_write_then_read(), you need to make sure the buffers you pass spi are DMA safe.
- Nuno Sá