of_graph_ge...oint_by_regs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ of_graph_ge...oint_by_regs(9) ✨

okay so bestie, like, real talk: this is a page from the Kernel API Manual (yes, the Linux kernel, we're literally in the big leagues πŸ’…) and the function name is genuinely that long, don't @ me, that's just how it's spelled β€” of_graph_ge...oint_by_regs(9), ellipsis and all. iykyk πŸŽ€


🌸 NAME 🌸

of_graph_get_endpoint_by_regs β€” bestie. it gets you an endpoint node that has specific identifiers. that's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct device_node * of_graph_get_endpoint_by_regs (const struct
       device_node *parent , int port_reg , int reg );

like, look at her. three args, one pointer out. iconic. πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • parent β€” pointer to the parent device node 🫢 (yes, the actual parent, we're going in)
  • port_reg β€” the identifier of the parent port node, and by "identifier" we mean the value of its reg property, periodt.
  • reg β€” the identifier of the endpoint node, again: value of the reg property. that one. πŸ’…

⭐ RETURN ⭐

You get back an 'endpoint' node pointer β€” and she's a very specific girlie: she's the one identified by reg, and at the same time she's the child of a port node identified by port_reg. two whole criteria. main character energy fr fr. 🌈

🚨 bestie listen β€” reg and port_reg are ignored when they are -1. like, straight up not read. so if you pass -1 don't be out here expecting it to filter anything, okay?
🫢 and please, PLEASE β€” use of_node_put on the pointer when done. that's not optional, that's a reference you're holding. clean up after yourself, we don't leak. 😭

🧚 SEE ALSO 🧚

Kernel file ./drivers/of/property.c β€” that's the home base, go say hi πŸ’œ

and then the whole friend group:

like. the whole squad. ate and left no crumbs πŸ“πŸ”₯


and that's the tea, bestie πŸŽ€ this masterpiece lives over in ./drivers/of and it's dated October 2026 β€” so yeah, of_graph_ge...oint_by_regs(9), Kernel API Manual, October 2026, ./drivers/of. mwah. go call of_node_put. πŸ’‹βœ¨

πŸ“¦ where this page comes from