nvmem_cell_read(9)
π nvmem_cell_read(9) π
okay so bestie, welcome to the kernel API manual β this one's called nvmem_cell_read(9) and it lives in the Kernel API Manual, and honestly? it's giving "small function, big responsibility." let's get into it π¦
β¨ NAME β¨
nvmem_cell_read β read a given nvmem cell, that's the whole vibe π
πΈ SYNOPSIS πΈ
void * nvmem_cell_read (struct nvmem_cell *cell , size_t *len );
literally just hand it a cell and a length pointer and it does its thing β¨
π«Ά ARGUMENTS π«Ά
cellβ the nvmem cell you wanna read. that's your main character right there πlenβ a pointer to the length of the cell, and it gets populated on a successful read. can beNULLif you're not about that length life π
π RETURN π
so here's the tea: you get ERR_PTR on error, or a valid pointer to a buffer on success. and listen β the consumer has to free that buffer with kfree. no cap, don't leave it hanging or that's a leak and the kernel will NOT be slaying about it π
β SEE ALSO β
kernel file ./drivers/nvmem/core.c β and like, the whole extended friend group:
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_get(9)devm_nvmem_cell_put(9)nvmem_cell_put(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)
k that's the whole page, bestie β mwah π
sign-off szn: this little gem comes from ./drivers/nvmem, dated October 2026. screenshot it, frame it, put it on your fridge πβ¨
π¦ 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