nvmem_cell_read_u16(9)
π nvmem_cell_read_u16(9) π
okay so bestie, welcome to the Kernel API Manual β this one is short and sweet and it's literally just "read a cell value as a u16". That's the whole vibe. One job. Iconic behavior, honestly.
β¨ SYNOPSIS β¨
int nvmem_cell_read_u16 (struct device *dev , const char *cell_id , u16
*val );
like, look at her. tiny signature, big main character energy π
πΈ ARGUMENTS πΈ
devβ thestruct device *that's asking for the nvmem cell. it's giving "hi yes this is mine, i'm requesting it" π«Άcell_idβ the name of the nvmem cell you wanna read.const char *, obviously. you gotta know her name to call her πvalβ pointer to the output value, typeu16 *. this is where the answer lands. it's the little mailbox where your number gets dropped off π
β RETURN β
0 on success, or a negative errno if things went sideways. no cap β check it, bestie, don't just rawdog the return value π
π¦ SEE ALSO π¦
the whole friend group lives in the kernel file ./drivers/nvmem/core.c β go say hi to:
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_read(9)nvmem_cell_write(9)nvmem_cell_read_u8(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)
every single one of them, we don't leave anyone on read π and yeah, the u8, u32 and u64 girlies are all right there β pick your width, periodt π
ngl this one's a snack: you passdev, you passcell_id, you get au16in*val. that's it. that's the function. slay π₯
and that's a wrap, bestie!! π filed under ./drivers/nvmem, dated October 2026, and yes the page name is literally nvmem_cell_read_u16(9) β go read some 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