Thread (49 messages) 49 messages, 7 authors, 2022-09-02

Re: [RFC PATCH v1 12/14] nvmem: layouts: rewrite the u-boot-env driver as a NVMEM layout

From: Rafał Miłecki <rafal@milecki.pl>
Date: 2022-08-28 15:24:28
Also in: linux-arm-kernel, linux-devicetree, lkml

On 25.08.2022 23:44, Michael Walle wrote:
Instead of hardcoding the underlying access method mtd_read() and
duplicating all the error handling, rewrite the driver as a nvmem
layout which just uses nvmem_device_read() and thus works with any
NVMEM device.

But because this is now not a device anymore, the compatible string
will have to be changed so the device will still be probed:
   compatible = "u-boot,env";
to
   compatible = "u-boot,env", "nvmem-cells";

"nvmem-cells" will tell the mtd layer to register a nvmem_device().
"u-boot,env" will tell the NVMEM that it should apply the u-boot
environment layout to the NVMEM device.
That's fishy but maybe we can ignore backward compatibility at
point.

Still you need to update DT binding.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help