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

Kory Maincent kory.maincent at bootlin.com
Mon May 26 08:04:46 PDT 2025


Le Wed, 27 Sep 2023 22:44:46 +0200,
Rafał Miłecki <zajec5 at gmail.com> a écrit :

> 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.

Hello,

Was there a reason to not add the legacy flag to all the drivers that was
supporting nvmem at the time nvmem fixed layout was supported?

I just faced a nvmem layout regression on board with an at24 eeprom.

Commit: 27f699e578b1 nvmem: core: add support for fixed cells *layout*
$ git grep nvmem_config drivers/ | cut -d ':' -f 1 | sort -u
drivers/hwmon/pmbus/adm1266.c
drivers/iio/pressure/bmp280-core.c
drivers/media/i2c/ov2740.c
drivers/media/i2c/video-i2c.c
drivers/misc/eeprom/at24.c
drivers/misc/eeprom/at25.c
drivers/misc/eeprom/eeprom_93xx46.c
drivers/mtd/mtdcore.c
drivers/nvmem/apple-efuses.c
drivers/nvmem/bcm-ocotp.c
drivers/nvmem/brcm_nvram.c
drivers/nvmem/core.c
drivers/nvmem/imx-iim.c
drivers/nvmem/imx-ocotp.c
drivers/nvmem/imx-ocotp-ele.c
drivers/nvmem/imx-ocotp-scu.c
drivers/nvmem/jz4780-efuse.c
drivers/nvmem/lan9662-otpc.c
drivers/nvmem/layerscape-sfp.c
drivers/nvmem/lpc18xx_eeprom.c
drivers/nvmem/lpc18xx_otp.c
drivers/nvmem/meson-efuse.c
drivers/nvmem/meson-mx-efuse.c
drivers/nvmem/microchip-otpc.c
drivers/nvmem/mtk-efuse.c
drivers/nvmem/mxs-ocotp.c
drivers/nvmem/nintendo-otp.c
drivers/nvmem/qcom-spmi-sdam.c
drivers/nvmem/qfprom.c
drivers/nvmem/rave-sp-eeprom.c
drivers/nvmem/rmem.c
drivers/nvmem/rockchip-efuse.c
drivers/nvmem/rockchip-otp.c
drivers/nvmem/sc27xx-efuse.c
drivers/nvmem/snvs_lpgpr.c
drivers/nvmem/sprd-efuse.c
drivers/nvmem/stm32-romem.c
drivers/nvmem/sunplus-ocotp.c
drivers/nvmem/sunxi_sid.c
drivers/nvmem/u-boot-env.c
drivers/nvmem/uniphier-efuse.c
drivers/nvmem/vf610-ocotp.c
drivers/nvmem/zynqmp_nvmem.c
drivers/rtc/nvmem.c
drivers/rtc/rtc-abx80x.c
drivers/rtc/rtc-cmos.c
drivers/rtc/rtc-ds1305.c
drivers/rtc/rtc-ds1307.c
drivers/rtc/rtc-ds1343.c
drivers/rtc/rtc-ds1511.c
drivers/rtc/rtc-ds1553.c
drivers/rtc/rtc-ds1685.c
drivers/rtc/rtc-ds1742.c
drivers/rtc/rtc-ds3232.c
drivers/rtc/rtc-isl12026.c
drivers/rtc/rtc-isl1208.c
drivers/rtc/rtc-m48t59.c
drivers/rtc/rtc-m48t86.c
drivers/rtc/rtc-meson.c
drivers/rtc/rtc-omap.c
drivers/rtc/rtc-pcf2127.c
drivers/rtc/rtc-pcf85063.c
drivers/rtc/rtc-pcf85363.c
drivers/rtc/rtc-rp5c01.c
drivers/rtc/rtc-rv3028.c
drivers/rtc/rtc-rv3029c2.c
drivers/rtc/rtc-rv3032.c
drivers/rtc/rtc-rv8803.c
drivers/rtc/rtc-rx8581.c
drivers/rtc/rtc-stk17ta8.c
drivers/rtc/rtc-sun6i.c
drivers/rtc/rtc-ti-k3.c
drivers/soc/atmel/sfr.c
drivers/soc/tegra/fuse/fuse-tegra.c
drivers/thunderbolt/nvm.c
drivers/w1/slaves/w1_ds250x.c

-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com



More information about the Linux-mediatek mailing list