]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: spinand: List vendor specific operations and make sure they are supported
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 9 Jan 2026 17:18:12 +0000 (18:18 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 29 Jan 2026 19:21:41 +0000 (20:21 +0100)
commitfbc7538782f8e7df4737dcec7d854cf4d53bfc67
treefe6dac88264cedc5b6904561d9b4b81cd4f722d8
parent6ec7ace0127077d1caab6ca1fb0129da8eb5c1de
mtd: spinand: List vendor specific operations and make sure they are supported

It is probably safe to expect that all SPI controller drivers will ever
support all the most basic SPI NAND operations, such as write enable,
register reads, page program, block erases, etc. However, what about
vendor specific operations? So far nobody complained about it, but as we
are about to introduce octal DTR support, and as none of the SPI NAND
instruction set is defined in any standard, we must remain careful about
these extra operations.

One way to make sure we do not blindly get ourselves in strange
situations with vendor commands failing silently is to make the check
once for all, while probing the chip. However at this stage we have no
such list, so let's add the necessary infrastructure to allow:
- registering vendor operations,
- checking they are actually supported when appropriate.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/spi/core.c
include/linux/mtd/spinand.h