mtd: call of_platform_populate() for MTD partitions
authorRafał Miłecki <rafal@milecki.pl>
Tue, 10 May 2022 13:12:59 +0000 (15:12 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 16 May 2022 16:37:48 +0000 (18:37 +0200)
commitbcdf0315a61a29eb753a607d3a85a4032de72d94
treef021207fad662a6ff6ddc70fd9c9d6cb3b268fc5
parent43823c5c56f247cfc028bf90299f675dd29abf88
mtd: call of_platform_populate() for MTD partitions

Until this change MTD subsystem supported handling partitions only with
MTD partitions parsers. That's a specific / limited API designed around
partitions.

Some MTD partitions may however require different handling. They may
contain specific data that needs to be parsed and somehow extracted. For
that purpose MTD subsystem should allow binding of standard platform
drivers.

An example can be U-Boot (sub)partition with environment variables.
There exist a "u-boot,env" DT binding for MTD (sub)partition that
requires an NVMEM driver.

Ref: 5db1c2dbc04c ("dt-bindings: nvmem: add U-Boot environment variables binding")
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/20220510131259.555-1-zajec5@gmail.com
drivers/mtd/mtdpart.c