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

Heiko Stübner heiko at sntech.de
Wed Apr 5 06:01:10 PDT 2023


Am Dienstag, 4. April 2023, 00:55:40 CEST schrieb Rafał Miłecki:
> From: Rafał Miłecki <rafal at milecki.pl>
> 
> 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 at milecki.pl>
> [for meson-{efuse,mx-efuse}.c]
> Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
> [for mtk-efuse.c, nvmem/core.c, nvmem-provider.h]
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> [MT8192, MT8195 Chromebooks]
> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> [for microchip-otpc.c]
> Reviewed-by: Claudiu Beznea <claudiu.beznea at microchip.com>
> [SAMA7G5-EK]
> Tested-by: Claudiu Beznea <claudiu.beznea at microchip.com>

> 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 at sntech.de>





More information about the Linux-rockchip mailing list