summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-03-19 14:47:20 +0100
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-03-20 09:46:02 +0100
commit97baea1e6b74c73973fa0922252f880ab15450ea (patch)
tree45bf059e4fcf9ba28672b9c175d0a9417de7230e /include/linux/mtd
parentb958758e686aebe84672acc8871aca87d04f13a3 (diff)
downloadlinux-stable-97baea1e6b74c73973fa0922252f880ab15450ea.tar.gz
linux-stable-97baea1e6b74c73973fa0922252f880ab15450ea.tar.bz2
linux-stable-97baea1e6b74c73973fa0922252f880ab15450ea.zip
mtd: rawnand: use wrappers to call onfi GET/SET_FEATURES
Prepare the fact that some features managed by GET/SET_FEATURES could be overloaded by vendor code. To handle this logic, use new wrappers instead of directly call the ->get/set_features() hooks. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/rawnand.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index fb2e288ef8b1..3cc2a3435b20 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -1629,6 +1629,9 @@ int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page);
int nand_read_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
int page);
+/* Wrapper to use in order for controllers/vendors to GET/SET FEATURES */
+int nand_get_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
+int nand_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
/* Stub used by drivers that do not support GET/SET FEATURES operations */
int nand_get_set_features_notsupp(struct mtd_info *mtd, struct nand_chip *chip,
int addr, u8 *subfeature_param);