of_reserved...init_by_name(9)
π of_reserved...init_by_name(9) β Kernel API Manual, section 9 π
okay so bestie, we're in the kernel API manual (section 9, the grown-up one) and today's main character is of_reserved_mem_device_init_by_name β¨ ngl the name is a whole sentence but she ate, we move.
β¨ NAME β¨
of_reserved_mem_device_init_by_name β assign a named reserved memory region to a given device π«Ά like, you picked the region by name, and now it belongs to your device, periodt.
πΈ SYNOPSIS πΈ
int of_reserved_mem_device_init_by_name (struct device *dev , struct device_node *np , const char *name );
look at her. three args, one int, zero drama π₯
π ARGUMENTS π
devβ pointer to the device you're configuring π this is the one getting the memory region, she's the main character herenpβ pointer to the device node with the'memory-region'property π (yes that's the exact property name, keep it exactly like that, iykyk)nameβ the name of the selected memory region π the "by name" part of the whole situation, bestie
π¦ RETURN π¦
0 on success π or a negative error-code on failure π (yes negative, it's giving "return of the negative error-code", that's just how kernel does)
heads up bestie: negative means something went wrong. don't treat it as true/false, fr fr, check the sign π
π SEE ALSO π
Kernel file:
./drivers/of/of_reserved_mem.cβ the source, go read her, she's iconic π§
and the whole friend group:
fdt_scan_reserved_mem_late(9)fdt_fixup_reserved_mem_node(9)fdt_validate_reserved_mem_node(9)__reserved_mem_init_node(9)fdt_init_reserved_mem_node(9)of_reserved_mem_device_init_by_idx(9)β the index-based sibling, same energy, different lookup πof_reserved_mem_device_release(9)devm_of_reserved_mem_device_init(9)of_reserved_mem_lookup(9)of_reserved_mem_region_to_resource(9)of_reserved_mem_region_to_resource_byname(9)of_reserved_mem_region_count(9)
π reminder to my girlies: these are pointers, sodev,npandnamebetter be real. no cap, no guessing, noNULLshenanigans π
o wait and one last thing β this page lives at ./drivers/of, datestamped October 2026, so if you're reading this from the future: hi bestie, slay, you're doing amazing π π¦ πΈ and that's the whole vibe check, mwah π«Άβ¨
π¦ 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