mtd: core: try to find OF node for every MTD partition
authorRafał Miłecki <rafal@milecki.pl>
Tue, 4 Oct 2022 08:37:10 +0000 (10:37 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 7 Nov 2022 16:07:56 +0000 (17:07 +0100)
commit2df11f00100d7278185a9dbefa20ba3f5d32401d
tree200a65259a2a1854f9febd79e10191b84dcedbd0
parentc5f5d0cd40e3bc2d6d397af788a7c0241b1c6b68
mtd: core: try to find OF node for every MTD partition

So far this feature was limited to the top-level "nvmem-cells" node.
There are multiple parsers creating partitions and subpartitions
dynamically. Extend that code to handle them too.

This allows finding partition-* node for every MTD (sub)partition.

Random example:

partitions {
compatible = "brcm,bcm947xx-cfe-partitions";

partition-firmware {
compatible = "brcm,trx";

partition-loader {
};
};
};

Cc: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20221004083710.27704-2-zajec5@gmail.com
drivers/mtd/mtdcore.c