]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit164ef038e43590e831bbaf486b80c87fc2b9a1db
treef021207fad662a6ff6ddc70fd9c9d6cb3b268fc5
parent6e6e9ffcc6625fff9e5179d01c3379ea04686a0c
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: 331b8570cf6a ("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