[PATCH v2 17/17] mtd: spi-nor: Fix the meaning of a comment

From: Miquel Raynal

Date: Sun Oct 04 2026 - 17:37:48 EST


I got mislead by the comment above spi_nor_setup() which implies that we
program a specific configuration into the device. spi_nor_setup() is
pure software, it is the step where the core configures itself for
dealing with the device. spi_nor_init() is where we tell the device how
to communicate with us based on all the knowledge we gathered from its
SFDP table and the DT.

Improve the comment a bit to reflect the fact that one should not write
volatile configurations in spi_nor_setup(). spi_nor_init() should be
used for that instead (since it is called at resume time).

Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
drivers/mtd/spi-nor/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 0757e5a7cf2b..bcbce84c1163 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3491,7 +3491,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
init_waitqueue_head(&nor->rww.wait);

/*
- * Configure the SPI memory:
+ * Decide how we will deal with the SPI memory:
* - select op codes for (Fast) Read, Page Program and Sector Erase.
* - set the number of dummy cycles (mode cycles + wait states).
* - set the SPI protocols for register and memory accesses.

--
2.55.0