[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220921123745.61299d6a@xps-13>
Date: Wed, 21 Sep 2022 12:37:45 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Michael Walle <michael@...le.cc>
Cc: Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Shawn Guo <shawnguo@...nel.org>, Li Yang <leoyang.li@....com>,
Rafał Miłecki <rafal@...ecki.pl>,
Frank Rowand <frowand.list@...il.com>,
linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Ahmad Fatoum <a.fatoum@...gutronix.de>,
Philipp Zabel <p.zabel@...gutronix.de>
Subject: Re: [RFC PATCH v2 19/20] nvmem: layouts: rewrite the u-boot-env
driver as a NVMEM layout
Hi Michael,
michael@...le.cc wrote on Fri, 2 Sep 2022 00:18:56 +0200:
> 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.
>
> Signed-off-by: Michael Walle <michael@...le.cc>
> ---
> changes since v1:
> - none
>
> drivers/nvmem/layouts/Kconfig | 8 ++
> drivers/nvmem/layouts/Makefile | 1 +
> drivers/nvmem/layouts/u-boot-env.c | 144 +++++++++++++++++++
> drivers/nvmem/u-boot-env.c | 218 -----------------------------
Nit: IIRC there is a MAINTAINERS entry to update as well.
Thanks,
Miquèl
Powered by blists - more mailing lists