Lines Matching +full:mtd +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0-only
6 * This map driver is used to allocate "placeholder" MTD
9 * registration of MTD device nodes regardless of probe outcome.
17 * Any device 'probed' with this driver will return -ENODEV
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/map.h>
41 .name = "map_absent",
47 struct mtd_info *mtd; in map_absent_probe() local
49 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_absent_probe()
50 if (!mtd) { in map_absent_probe()
54 map->fldrv = &map_absent_chipdrv; in map_absent_probe()
55 mtd->priv = map; in map_absent_probe()
56 mtd->name = map->name; in map_absent_probe()
57 mtd->type = MTD_ABSENT; in map_absent_probe()
58 mtd->size = map->size; in map_absent_probe()
59 mtd->_erase = map_absent_erase; in map_absent_probe()
60 mtd->_read = map_absent_read; in map_absent_probe()
61 mtd->_write = map_absent_write; in map_absent_probe()
62 mtd->_sync = map_absent_sync; in map_absent_probe()
63 mtd->flags = 0; in map_absent_probe()
64 mtd->erasesize = PAGE_SIZE; in map_absent_probe()
65 mtd->writesize = 1; in map_absent_probe()
68 return mtd; in map_absent_probe()
72 static int map_absent_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *b… in map_absent_read() argument
74 return -ENODEV; in map_absent_read()
77 static int map_absent_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_ch… in map_absent_write() argument
79 return -ENODEV; in map_absent_write()
82 static int map_absent_erase(struct mtd_info *mtd, struct erase_info *instr) in map_absent_erase() argument
84 return -ENODEV; in map_absent_erase()
87 static void map_absent_sync(struct mtd_info *mtd) in map_absent_sync() argument
92 static void map_absent_destroy(struct mtd_info *mtd) in map_absent_destroy() argument
112 MODULE_AUTHOR("Resilience Corporation - Eric Brower <ebrower@resilience.com>");
113 MODULE_DESCRIPTION("Placeholder MTD chip driver for 'absent' chips");