of_reserved_..._to_resource(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ of_reserved_..._to_resource(9) β€” the Kernel API Manual, bestie edition πŸ’…

okay so this is a page from the Kernel API Manual, and it's literally about of_reserved_mem_region_to_resource β€” yes the name is a whole mouthful, we're surviving tho 🫢


✨ NAME ✨

of_reserved_mem_region_to_resource β€” get a reserved memory region as a resource, periodt πŸ’–


🌸 SYNOPSIS 🌸

int of_reserved_mem_region_to_resource (const struct device_node *np ,
       unsigned int idx , struct resource *res );

πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” the node that's holding the 'memory-region' property, like it's carrying the whole vibe πŸ¦‹
  • idx β€” which 'memory-region' property entry you wanna look up, by index, iykyk πŸ”₯
  • res β€” pointer to a struct resource that gets filled in with the reserved region πŸ’œ

⭐ DESCRIPTION ⭐

so this function lets drivers look up a node's 'memory-region' property entries by index and hand back a struct resource for that entry. iconic behavior honestly πŸ‘‘

it returns 0 on success, with res filled in β€” slay 🌈

it returns -ENODEV if 'memory-region' is missing or unavailable, and -EINVAL for any other error. no cap, those are the only two error flavors πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/of/of_reserved_mem.c β€” go read it, it's giving main character energy πŸ“–βœ¨

and the whole friend group:


and that's the page, bestie πŸ“ it lives in ./drivers/of, it's dated October 2026, and it's filed under of_reserved_..._to_resource(9) β€” mwah, go touch some reserved memory πŸ’‹πŸ§š

πŸ“¦ where this page comes from