[PATCH V2] nvmem: add explicit config option to read OF fixed cells
michael at walle.cc
Thu Mar 9 01:40:10 PST 2023
[as this mentions nvmem layouts it would have been nice to include me]
> NVMEM subsystem looks for fixed NVMEM cells (specified in DT) by
> default. This behaviour made sense in early days before adding support
> for dynamic cells.
Why is that? It still makes sense, doesn't it?
> With every new supported NVMEM device with dynamic cells current
> behaviour becomes non-optimal. It results in unneeded iterating over DT
> nodes and may result in false discovery of cells (depending on used DT
What false discoveries?
> This behaviour has actually caused a problem already with the MTD
> subsystem. MTD subpartitions were incorrectly treated as NVMEM cells.
But this is solved, correct?
> Also with upcoming support for NVMEM layouts no new binding or driver
> should support fixed cells defined in device node.
How would you support older device trees with newer kernels or the
other way around? I'm not sure I get your motivation to drop handling
the fixed cells.
> Solve this by modifying drivers for bindings that support specifying
> fixed NVMEM cells in DT. Make them explicitly tell NVMEM subsystem to
> read cells from DT.
How can a driver know when there are fixed cells and when not? IOW.
only new ones can be affected.
If you want to get rid of the schema for *new* drivers then what
about having a new child node, something like "nvmem-fixed-cells",
similar to "nvmem-layout".
And then you'd tell the new drivers to use the new-style dt binding. But
there are no new drivers yet. So I'm still not sure I get your motivation.
More information about the linux-mtd