nvmem_cell_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nvmem_cell_get(9)

okay so this is a page from the Kernel API Manual β€” yes bestie, the kernel, the big scary one, and no it's not that deep, i promise 🫢


✨ NAME ✨

nvmem_cell_get β€” grab an nvmem cell for your device by name. that's it. that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

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

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device that's asking for the nvmem cell. like, hi yes it's me, i would like a cell please πŸ‘‘
  • id β€” the name of the nvmem cell you want. and listen, this one's a little context-dependent, so pay attention:
    • on DT systems it lines up with the name from the nvmem-cell-names property 🌈
    • on non-DT systems it lines up with the con_id from the lookup entry ⭐

same argument, two different matching rules depending on your setup β€” iykyk πŸ’«


πŸ’€ RETURN πŸ’€

you get one of two things, no in-between:

  • an ERR_PTR if something goes wrong 😭
  • a valid pointer to a struct nvmem_cell if it slays ✨
πŸ’– important bestie note: the nvmem_cell gets freed by the nvmem_cell_put. so like... don't just abandon it, okay? that's not the move.

πŸ”₯ SEE ALSO πŸ”₯

all the siblings, cousins, and extended family πŸ‘‘ the kernel file is ./drivers/nvmem/core.c, and here's literally everyone:

that's 33 entries bestie, i counted, and yes i listed every single one because we don't do half-finished over here πŸ’…


anyway that's the whole page!! this lil beauty lives in ./drivers/nvmem and the version on record is dated October 2026 β€” mwah, go read your cells, ily, bye πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from