nvmem_cell_get(9)
π 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-namesproperty π - on non-DT systems it lines up with the
con_idfrom the lookup entry β
- on DT systems it lines up with the name from the
same argument, two different matching rules depending on your setup β iykyk π«
π RETURN π
you get one of two things, no in-between:
- an
ERR_PTRif something goes wrong π - a valid pointer to a
struct nvmem_cellif it slays β¨
π important bestie note: thenvmem_cellgets freed by thenvmem_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:
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)devm_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)
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
- 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