aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorMason Yang <masonccyang@mxic.com.tw>2020-03-18 15:42:27 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-03-24 22:44:45 +0100
commitadc6162b9a0c60a81cf6a107196924526cd186f6 (patch)
treec6199bbf50a411fbbdda2ca2a6b9fd6d1da8b09a /include/linux/mtd
parentmtd: spinand: micron: Add new Micron SPI NAND devices with multiple dies (diff)
downloadwireguard-linux-adc6162b9a0c60a81cf6a107196924526cd186f6.tar.xz
wireguard-linux-adc6162b9a0c60a81cf6a107196924526cd186f6.zip
mtd: rawnand: Add support for manufacturer specific suspend/resume operation
Patch nand_suspend() & nand_resume() to let manufacturers overwrite suspend/resume operations. Signed-off-by: Mason Yang <masonccyang@mxic.com.tw> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/1584517348-14486-2-git-send-email-masonccyang@mxic.com.tw
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/rawnand.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 49ed50fb44ab..1e76196f9829 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -1064,6 +1064,8 @@ struct nand_legacy {
* @lock: lock protecting the suspended field. Also used to
* serialize accesses to the NAND device.
* @suspended: set to 1 when the device is suspended, 0 when it's not.
+ * @suspend: [REPLACEABLE] specific NAND device suspend operation
+ * @resume: [REPLACEABLE] specific NAND device resume operation
* @bbt: [INTERN] bad block table pointer
* @bbt_td: [REPLACEABLE] bad block table descriptor for flash
* lookup.
@@ -1119,6 +1121,8 @@ struct nand_chip {
struct mutex lock;
unsigned int suspended : 1;
+ int (*suspend)(struct nand_chip *chip);
+ void (*resume)(struct nand_chip *chip);
uint8_t *oob_poi;
struct nand_controller *controller;