devm_nvmem_register(9)
π devm_nvmem_register(9) π
okay so this is a page from the Kernel API Manual, and bestie, it's literally about registering a managed nvmem device π like it handles the cleanup energy for you so you don't have to, and honestly? main character behavior.
β¨ NAME β¨
devm_nvmem_register β registers a managed nvmem device for a given nvmem_config. it also creates a binary entry in /sys/bus/nvmem/devices/dev-name/nvmem π¦ which is honestly so iconic of it.
πΈ SYNOPSIS πΈ
struct nvmem_device * devm_nvmem_register (struct device *dev , const
struct nvmem_config *config );
π ARGUMENTS π
devβ the device that uses the nvmem device π like, whose device is this even for.configβ the nvmem device configuration that the nvmem device gets created with β¨ this is the whole blueprint, no cap.
β RETURN β
so what do you get back? it'll be an ERR_PTR on error π or a valid pointer to nvmem_device on success π and yes, you have to actually check it, that's the vibe check, fr fr.
π₯ SEE ALSO π₯
like a whole group chat of related functions, iykyk π
- the kernel file
./drivers/nvmem/core.c nvmem_add_one_cell(9)nvmem_add_cells(9)nvmem_register_notifier(9)nvmem_unregister_notifier(9)nvmem_register(9)nvmem_unregister(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_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 the whole page bestie, go register something managed and slay π β¨
signing off from ./drivers/nvmem, dated October 2026, page name devm_nvmem_register(9) β mwah, ily, go read the source π«ΆπΈ
π¦ 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