devm_nvmem_cell_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_nvmem_cell_get(9) β€” the Kernel API Manual moment

okay so bestie, welcome to the Kernel API Manual page for devm_nvmem_cell_get(9), and honestly? it's giving "tiny function, big responsibility" and i'm kinda obsessed πŸŽ€


✨ NAME ✨

devm_nvmem_cell_get β€” grab yourself the nvmem cell of a device from a given id 🧚


🌸 SYNOPSIS 🌸

struct nvmem_cell * devm_nvmem_cell_get (struct device *dev , const char
*id );

like literally that's the whole thing. short, sweet, slays πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the Device that's requesting the nvmem cell. it's the main character here, fr fr πŸ‘‘
  • id β€” the nvmem cell name id you wanna get. that's the key to the whole vibe check πŸ—οΈ

πŸ”₯ RETURN πŸ”₯

so what do you get back? it'll be an ERR_PTR on error 😭 , or a valid pointer to a struct nvmem_cell ✨.

and here's the cute part β€” the nvmem_cell will be freed automatically once the device is freed. no manual cleanup arc needed, the devm magic handles it for you. periodt 🫢

ngl, "automatically once the device is freed" is the whole devm flex, so don't go freeing it yourself, bestie.

πŸ’– SEE ALSO πŸ’–

the whole nvmem extended universe, assembled like a group chat 🌈. kernel file ./drivers/nvmem/core.c, plus:


anyway that's the page 🫢 this little beauty lives in ./drivers/nvmem, sourced from the October 2026 drop of devm_nvmem_cell_get(9), and this rewrite was brought to you by me, your local unix-obsessed bestie πŸ’œ go read some kernel source, it's iconic ⭐

πŸ“¦ where this page comes from