Re: [PATCH V4] nvmem: add explicit config option to read old syntax fixed OF cells

From: Heiko Stübner
Date: Wed Apr 05 2023 - 09:02:43 EST


Am Dienstag, 4. April 2023, 00:55:40 CEST schrieb Rafał Miłecki:
> From: Rafał Miłecki <rafal@xxxxxxxxxx>
>
> Binding for fixed NVMEM cells defined directly as NVMEM device subnodes
> has been deprecated. It has been replaced by the "fixed-layout" NVMEM
> layout binding.
>
> New syntax is meant to be clearer and should help avoiding imprecise
> bindings.
>
> NVMEM subsystem already supports the new binding. It should be a good
> idea to limit support for old syntax to existing drivers that actually
> support & use it (we can't break backward compatibility!). That way we
> additionally encourage new bindings & drivers to ignore deprecated
> binding.
>
> It wasn't clear (to me) if rtc and w1 code actually uses old syntax
> fixed cells. I enabled them to don't risk any breakage.
>
> Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
> [for meson-{efuse,mx-efuse}.c]
> Acked-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
> [for mtk-efuse.c, nvmem/core.c, nvmem-provider.h]
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
> [MT8192, MT8195 Chromebooks]
> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
> [for microchip-otpc.c]
> Reviewed-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
> [SAMA7G5-EK]
> Tested-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>

> diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
> index e4579de5d014..adc8bc70cffa 100644
> --- a/drivers/nvmem/rockchip-efuse.c
> +++ b/drivers/nvmem/rockchip-efuse.c
> @@ -205,6 +205,7 @@ static int rockchip_rk3399_efuse_read(void *context, unsigned int offset,
>
> static struct nvmem_config econfig = {
> .name = "rockchip-efuse",
> + .add_legacy_fixed_of_cells = true,
> .stride = 1,
> .word_size = 1,
> .read_only = true,

for rockchip-efuse.c
Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>