[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b8a14fe018973dc5450192cce6851e2@walle.cc>
Date: Sun, 28 Aug 2022 16:42:07 +0200
From: Michael Walle <michael@...le.cc>
To: Rafał Miłecki <rafal@...ecki.pl>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>,
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>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
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,
netdev@...r.kernel.org, Ahmad Fatoum <a.fatoum@...gutronix.de>
Subject: Re: [RFC PATCH v1 12/14] nvmem: layouts: rewrite the u-boot-env
driver as a NVMEM layout
Am 2022-08-28 16:04, schrieb Rafał Miłecki:
> 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.
As mentioned in the cover letter, this is why this is an RFC. I
didn't see any users in the device tree, nor can I see how this
would have been used anyway, because you cannot find a cell by
its device tree node, because none is registered. So maybe we
can still change the compatible string.
-michael
> Still you need to update DT binding.
Powered by blists - more mailing lists