Re: [PATCH V1] spi: Add support for Double Transfer Rate (DTR) mode

From: Mukesh Kumar Savaliya
Date: Fri Apr 04 2025 - 09:54:26 EST


Thanks Mark !

On 3/27/2025 7:37 PM, Mark Brown wrote:
On Thu, Mar 27, 2025 at 03:33:15PM +0530, Mukesh Kumar Savaliya wrote:

IIUC, It comes to the point of first identifying if it's in context of QSPI
controller or SPI controller right ?

Identify if SPI/QSPI controller has this capability using dtr_caps =
true/false. Then check if it's supporting SDR/DDR mode. Can we then
introduce below struct to first mark capability as true/false and then
process dtr_mode ?

if not supported (dtr_caps = false), then don't care dtr_mode.

We should complain if the device requsted anything the controller can't
support.

Yes, makes sense. i have added dtr_caps into controller data structure and validating it inside the __spi_validate().
struct spi_caps {
bool dtr_mode;
bool dtr_caps;
};

The controller capabilities are currently mainly advertised via the
SPI_CONTROLLER_ flags but adding some bools also works, some things
already do use that. I'm not sure we need to wrap things in a further
struct though.
Uploaded Patch V2. Please help review and suggest next. it may require still some fine stunning.