STRUCT NVMEM_LAYOUT(9)
π struct nvmem_layout(9) π
okay so real talk β welcome to the struct nvmem_layout(9) page from the Kernel API Manual, bestie. this is the whole entire vibe of NVMEM layout definitions, and honestly? it's giving "small struct, big responsibilities." let's get into it π«Ά
β¨ NAME β¨
struct nvmem_layout β NVMEM layout definitions. that's it, that's the tweet π
πΈ SYNOPSIS πΈ
struct nvmem_layout {
struct device dev;
struct nvmem_device *nvmem;
int (*add_cells)(struct nvmem_layout *layout);
};
likeβ¦ three members. minimal. iconic. main character energy π₯
π Members π
devβ the device-model layout device. yes it's a wholestruct device, it's living its best life in the device model β¨nvmemβ the underlying NVMEM device. the actual memory situation underneath all the layout drama πΎadd_cellsβ bestie this is the callback that gets called if a nvmem device is found which has this layout. when it fires, the function will add layout specific cells withnvmem_add_one_cell. no cap, that's the whole job π§
π¦ Description π¦
so here's the lore: a nvmem device can hold a well defined structure which can just be evaluated during runtime. for example a TLV list, or a list of "name=val" pairs. and a nvmem layout? it can parse the nvmem device and add appropriate cells. literally that's the plot π
π SEE ALSO π
- Kernel file
./include/linux/nvmem-provider.h struct nvmem_keepout(9)struct nvmem_cell_info(9)struct nvmem_config(9)of_nvmem_layout_get_container(9)
go read them, iykyk πβ¨
k that's the page!! mwah π
and for the sign-off: this cutie lives in ./include/linux, dated October 2026, and it's filed under struct nvmem_layout(9). slay, go parse some cells ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms