STRUCT NVMEM_LAYOUT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 whole struct 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 with nvmem_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 πŸ‘‘

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