mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
55d4980ce5
Callback .read_post_process() is designed to modify raw cell content before providing it to the consumer. So far we were dealing with modifications that didn't affect cell size (length). In some cases however cell content needs to be reformatted and resized. It's required e.g. to provide properly formatted MAC address in case it's stored in a non-binary format (e.g. using ASCII). There were few discussions how to optimally handle that. Following possible solutions were considered: 1. Allow .read_post_process() to realloc (resize) content buffer 2. Allow .read_post_process() to adjust (decrease) just buffer length 3. Register NVMEM cells using post-read sizes The preferred solution was the last one. The problem is that simply adjusting "bytes" in NVMEM providers would result in core code NOT passing whole raw data to .read_post_process() callbacks. It means callback functions couldn't do their job without somehow manually reading original cell content on their own. This patch deals with that by registering NVMEM cells with both lengths: raw content one and post read one. It allows: 1. Core code to read whole raw cell content 2. Callbacks to return content they want Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230404172148.82422-35-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
layouts | ||
apple-efuses.c | ||
bcm-ocotp.c | ||
brcm_nvram.c | ||
core.c | ||
imx-iim.c | ||
imx-ocotp-scu.c | ||
imx-ocotp.c | ||
jz4780-efuse.c | ||
Kconfig | ||
lan9662-otpc.c | ||
layerscape-sfp.c | ||
lpc18xx_eeprom.c | ||
lpc18xx_otp.c | ||
Makefile | ||
meson-efuse.c | ||
meson-mx-efuse.c | ||
microchip-otpc.c | ||
mtk-efuse.c | ||
mxs-ocotp.c | ||
nintendo-otp.c | ||
qcom-spmi-sdam.c | ||
qfprom.c | ||
rave-sp-eeprom.c | ||
rmem.c | ||
rockchip-efuse.c | ||
rockchip-otp.c | ||
sc27xx-efuse.c | ||
snvs_lpgpr.c | ||
sprd-efuse.c | ||
stm32-bsec-optee-ta.c | ||
stm32-bsec-optee-ta.h | ||
stm32-romem.c | ||
sunplus-ocotp.c | ||
sunxi_sid.c | ||
u-boot-env.c | ||
uniphier-efuse.c | ||
vf610-ocotp.c | ||
zynqmp_nvmem.c |