Skip to content
Permalink
Browse files
mtd: core: add nvmem-partitions compatible to parse mtd as nvmem cells
Partitions that contains the nvmem-partitions compatible will register
their direct subonodes as nvmem cells and the node will be treated as a
nvmem provider.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel authored and intel-lab-lkp committed Feb 16, 2021
1 parent 8bd2323 commit ea1902bc853fa1f1050cc741912709fe5ebbdc41
Showing 1 changed file with 1 addition and 1 deletion.
@@ -543,7 +543,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
config.stride = 1;
config.read_only = true;
config.root_only = true;
config.no_of_node = true;
config.no_of_node = !of_device_is_compatible(node, "nvmem-partitions");
config.priv = mtd;

mtd->nvmem = nvmem_register(&config);

0 comments on commit ea1902b

Please sign in to comment.