[PATCH v4 01/11] spi: spi-mem: Rename the DQS setter and pin field

From: Miquel Raynal

Date: Fri Nov 20 2026 - 12:14:55 EST


The current approach was a bit too simple. Using the DQS feature
requires:
1- the chip to feature a DQS pin
2- proper wiring between the host and the chip
3- the controller capability to use it

Rename the helper and the field to reflect that we are talking here
about (1) the chip capability.

Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
drivers/spi/spi-mem.c | 10 +++++-----
include/linux/spi/spi-mem.h | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index baf6e430e563..1bea52c6f8a3 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -547,7 +547,7 @@ const char *spi_mem_get_name(struct spi_mem *mem)
EXPORT_SYMBOL_GPL(spi_mem_get_name);

/**
- * spi_mem_set_dqs() - Mark DQS as being available
+ * spi_mem_set_dqs_pin_available() - Mark DQS as being available
* @mem: the SPI memory
*
* When reading at high frequencies (> 100MHz), especially when DTR is enabled,
@@ -560,11 +560,11 @@ EXPORT_SYMBOL_GPL(spi_mem_get_name);
* Set the DQS boolean if the feature is available and configured at the chip
* level. Controllers may query this value.
*/
-void spi_mem_set_dqs(struct spi_mem *mem)
+void spi_mem_set_dqs_pin_available(struct spi_mem *mem)
{
- mem->dqs = true;
+ mem->dqs_pin = true;
}
-EXPORT_SYMBOL_GPL(spi_mem_set_dqs);
+EXPORT_SYMBOL_GPL(spi_mem_set_dqs_pin_available);

/**
* spi_mem_has_dqs() - Query whether the DQS is available or not
@@ -574,7 +574,7 @@ EXPORT_SYMBOL_GPL(spi_mem_set_dqs);
*/
bool spi_mem_has_dqs(struct spi_mem *mem)
{
- return mem->dqs;
+ return mem->dqs_pin;
}
EXPORT_SYMBOL_GPL(spi_mem_has_dqs);

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index b69f671c40e7..e3c0016be768 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -275,7 +275,7 @@ struct spi_mem_dirmap_desc {
* @spi: the underlying SPI device
* @drvpriv: spi_mem_driver private data
* @name: name of the SPI memory device
- * @dqs: extra data trobe pin available for high frequency read operations
+ * @dqs_pin: the memory provides a DQS pin
*
* Extra information that describe the SPI memory device and may be needed by
* the controller to properly handle this device should be placed here.
@@ -287,7 +287,7 @@ struct spi_mem {
struct spi_device *spi;
void *drvpriv;
const char *name;
- bool dqs;
+ bool dqs_pin;
};

/**
@@ -474,7 +474,7 @@ bool spi_mem_default_supports_op(struct spi_mem *mem,
}
#endif /* CONFIG_SPI_MEM */

-void spi_mem_set_dqs(struct spi_mem *mem);
+void spi_mem_set_dqs_pin_available(struct spi_mem *mem);
bool spi_mem_has_dqs(struct spi_mem *mem);
int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
void spi_mem_adjust_op_freq(struct spi_mem *mem, struct spi_mem_op *op);

--
2.56.0