Lines Matching refs:mtd
9 #include <linux/mtd/mtd.h>
10 #include <linux/mtd/spi-nor.h>
246 static int spi_nor_mtd_otp_info(struct mtd_info *mtd, size_t len,
249 struct spi_nor *nor = mtd_to_spi_nor(mtd);
307 static int spi_nor_mtd_otp_read_write(struct mtd_info *mtd, loff_t ofs,
311 struct spi_nor *nor = mtd_to_spi_nor(mtd);
383 static int spi_nor_mtd_otp_read(struct mtd_info *mtd, loff_t from, size_t len,
386 return spi_nor_mtd_otp_read_write(mtd, from, len, retlen, buf, false);
389 static int spi_nor_mtd_otp_write(struct mtd_info *mtd, loff_t to, size_t len,
392 return spi_nor_mtd_otp_read_write(mtd, to, len, retlen, buf, true);
395 static int spi_nor_mtd_otp_erase(struct mtd_info *mtd, loff_t from, size_t len)
397 struct spi_nor *nor = mtd_to_spi_nor(mtd);
448 static int spi_nor_mtd_otp_lock(struct mtd_info *mtd, loff_t from, size_t len)
450 struct spi_nor *nor = mtd_to_spi_nor(mtd);
485 struct mtd_info *mtd = &nor->mtd;
502 mtd->_get_user_prot_info = spi_nor_mtd_otp_info;
503 mtd->_read_user_prot_reg = spi_nor_mtd_otp_read;
504 mtd->_write_user_prot_reg = spi_nor_mtd_otp_write;
505 mtd->_lock_user_prot_reg = spi_nor_mtd_otp_lock;
506 mtd->_erase_user_prot_reg = spi_nor_mtd_otp_erase;