Lines Matching refs:mtd
11 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
30 struct mtd_info mtd;
39 #define to_mchp23k256_flash(x) container_of(x, struct mchp23k256_flash, mtd)
60 static int mchp23k256_write(struct mtd_info *mtd, loff_t to, size_t len,
63 struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd);
99 static int mchp23k256_read(struct mtd_info *mtd, loff_t from, size_t len,
102 struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd);
195 mtd_set_of_node(&flash->mtd, spi->dev.of_node);
196 flash->mtd.dev.parent = &spi->dev;
197 flash->mtd.type = MTD_RAM;
198 flash->mtd.flags = MTD_CAP_RAM;
199 flash->mtd.writesize = 1;
200 flash->mtd.size = flash->caps->size;
201 flash->mtd._read = mchp23k256_read;
202 flash->mtd._write = mchp23k256_write;
204 err = mtd_device_register(&flash->mtd, data ? data->parts : NULL,
216 WARN_ON(mtd_device_unregister(&flash->mtd));