Skip to content

Implement nvmem support for mtd

Ansuel Smith linux-devicetree linux-mtd lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 10 repliesIn review
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mtd: partitions: ofpart: skip subnodes parse with compatibledrivers/mtd/parsers/ofpart.c+5 -02 replies
2/3mtd: core: add nvmem-partitions compatible to parse mtd as nvmem cellsdrivers/mtd/mtdcore.c+2 -11 reply
3/3dt-bindings: mtd: Document use of nvmem-partitions compatibleDocumentation/devicetree/bindings/mtd/partitions/nvmem-partitions.yaml+105 -07 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchRafał Miłecki
1/3
2/3T-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Implement nvmem support for mtd

The mtd support for the nvmem api has been stalled from 2018 with a patch half pushed hoping that a scheme is found for the mtd name later. This patchset try to address this.

The solution is simple.
New partitions scheme should always have the partitions {} structure and declare subnodes as partitions is deprecated and should not be used anymore. Fixed-partitions parser is changed to parse direct subnode as partitions only if the appropriate compatible is used. This change make possible the use of nvmem-partitions compatible and the entire partition node can be parsed by the nvmem of framework.
The current code register the partition to the nvmem framework every time but skip actually of_node parting. The new nvmem-partitions compatible is used to enable of_node parsing on the desired partitions.

Ansuel Smith (3):
mtd: partitions: ofpart: skip subnodes parse with compatible
mtd: core: add nvmem-partitions compatible to parse mtd as nvmem cells
dt-bindings: mtd: Document use of nvmem-partitions compatible

 .../mtd/partitions/nvmem-partitions.yaml      | 105 ++++++++++++++++++
 drivers/mtd/mtdcore.c                         |   3 +-
 drivers/mtd/parsers/ofpart.c                  |   5 +
 3 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem-partitions.yaml
Signature · 1 line
2.30.0