mtd: spinand: Add a ->configure_chip() hook
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 30 Sep 2025 00:21:05 +0000 (03:21 +0300)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sun, 5 Oct 2025 18:26:27 +0000 (20:26 +0200)
commit1e103284a51fae91e73bb2014221f53c53435341
treeefcda0d54dd2d135325ec73a9791d73d06871d15
parentf61362c24f5d827005cca5b46887400625faf540
mtd: spinand: Add a ->configure_chip() hook

There is already a manufacturer hook, which is manufacturer specific but
not chip specific. We no longer have access to the actual NAND identity
at this stage so let's add a per-chip configuration hook to align the
chip configuration (if any) with the core's setting.

This is a port of linux commit
da55809ebb45 ("mtd: spinand: Add a ->configure_chip() hook")

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> # U-Boot port
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/spi/core.c
include/linux/mtd/spinand.h