devm_nvmem_cell_get(9)
π 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:
nvmem_add_one_cell(9)nvmem_add_cells(9)nvmem_register_notifier(9)nvmem_unregister_notifier(9)nvmem_register(9)nvmem_unregister(9)devm_nvmem_register(9)of_nvmem_device_get(9)nvmem_device_get(9)nvmem_device_find(9)devm_nvmem_device_put(9)nvmem_device_put(9)devm_nvmem_device_get(9)of_nvmem_cell_get(9)nvmem_cell_get(9)devm_nvmem_cell_put(9)nvmem_cell_put(9)nvmem_cell_read(9)nvmem_cell_write(9)nvmem_cell_read_u8(9)nvmem_cell_read_u16(9)nvmem_cell_read_u32(9)nvmem_cell_read_u64(9)nvmem_cell_read_variable_le_u32(9)nvmem_cell_read_variable_le_u64(9)nvmem_device_cell_read(9)nvmem_device_cell_write(9)nvmem_device_read(9)nvmem_device_write(9)nvmem_add_cell_lookups(9)nvmem_del_cell_lookups(9)nvmem_dev_name(9)nvmem_dev_size(9)
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
- 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