On Thu, Mar 27, 2025 at 03:33:15PM +0530, Mukesh Kumar Savaliya wrote:Yes, makes sense. i have added dtr_caps into controller data structure and validating it inside the __spi_validate().
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.
Uploaded Patch V2. Please help review and suggest next. it may require still some fine stunning.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.