Skip to content

mtd: spi-nor: code refactoring and layering

Brian Norris linux-mtd 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mtd: fsl-quadspi: use automatic spi-nor detectiondrivers/mtd/spi-nor/fsl-quadspi.c+1 -710 replies
2/4mtd: spi-nor: assign mtd->priv in spi_nor_scan()drivers/mtd/devices/m25p80.c drivers/mtd/spi-nor/fsl-quadspi.c drivers/mtd/spi-nor/nxp-spifi.c +1 more+1 -31 reply
3/4mtd: spi-nor: add forward declaration for mtd_infoinclude/linux/mtd/spi-nor.h+2 -01 reply
4/4mtd: spi-nor: embed struct mtd_info within struct spi_nordrivers/mtd/devices/m25p80.c drivers/mtd/spi-nor/fsl-quadspi.c drivers/mtd/spi-nor/nxp-spifi.c +2 more+15 -211 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchJoachim EastwoodHan xu
1/4A-b T-b
2/4T-b
3/4T-b
4/4T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFT PATCH 0/4] mtd: spi-nor: code refactoring and layering

Hi,

I found a few areas where code should probably be refactored in the spi-nor driver layering while reviewing drivers recently. I don't have hardware for some of this, hence the Request For Test.

Potential future patch: push the MTD registration into a spi_nor_*() API. I would have just merged it into spi_nor_scan() now, but there are occasionally a few things that drivers want to do before exposing the MTD but after the SPI NOR probing. Perhaps a bottom-half API, and an optional all-in-one API that does both, similar to nand_base's nand_scan_ident(), nand_scan_tail(), and nand_scan()?

Anyway, enough random musings. Happy reviewing/testing.

Brian

Brian Norris (4):
mtd: fsl-quadspi: use automatic spi-nor detection
mtd: spi-nor: assign mtd->priv in spi_nor_scan()
mtd: spi-nor: add forward declaration for mtd_info
mtd: spi-nor: embed struct mtd_info within struct spi_nor

 drivers/mtd/devices/m25p80.c      | 11 ++++-------
 drivers/mtd/spi-nor/fsl-quadspi.c | 19 +++++--------------
 drivers/mtd/spi-nor/nxp-spifi.c   |  7 ++-----
 drivers/mtd/spi-nor/spi-nor.c     |  9 +++++----
 include/linux/mtd/spi-nor.h       |  4 +++-
 5 files changed, 19 insertions(+), 31 deletions(-)
Signature · 1 line
2.5.0.276.gf5e568e