nvmem_device_find(9)
β¨ nvmem_device_find(9) β¨
okay bestie, welcome to the Kernel API Manual π this one's a little function-hunting gem from the kernel, and yes it's giving "find your friend in a crowd" energy π«Ά
πΈ NAME πΈ
nvmem_device_find β find an nvmem device with a matching function, iykyk ππ
π¦ SYNOPSIS π¦
struct nvmem_device * nvmem_device_find (void *data , int
(*match)(struct device *dev, const void *data) );
π ARGUMENTS π
dataβ the data you're handing off to the match function. it's literally just passed along, no cap πmatchβ the callback function that checks the device. this is your vibe check, the thing that decides who's the one π
β RETURN β
ERR_PTR on error, or a valid pointer to a struct nvmem_device on success. so either it's a slay β¨ or it's an error pointer, and you gotta handle both, fr fr π
quick reminder bestie:ERR_PTRisn'tNULL! check with the proper macros, don't just doif (!ptr)or the kernel will be like "???" π
π SEE ALSO π
Kernel file ./drivers/nvmem/core.c β the whole friend group lives here π
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)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_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)
and that's the whole page, bestie, you ate that π«Άβ¨ this one came from the kernel source at ./drivers/nvmem and the manual page is dated October 2026 β iconic, periodt π
π
π¦ 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