of_find_ser...ller_by_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_find_ser...ller_by_node(9) β€” a Kernel API Manual moment πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ and yes the title really is truncated like that, it's giving "my name got cut off in the group chat preview" energy, but we move πŸ’… this is the page for of_find_ser...ller_by_node(9) fr fr.


🌸 NAME 🌸

of_find_serdev_controller_by_node β€” finds the serdev controller that's associated with the devicetree node, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct serdev_controller * of_find_serdev_controller_by_node (struct device_node *node );

like, that's the whole vibe. it takes a node, it gives you a controller pointer. iconic behavior honestly πŸ‘‘


πŸ“ ARGUMENTS πŸ“

  • node β€” the devicetree node you're looking with πŸ’« like this is the thing you hand over so the function knows which node you mean. just the devicetree node. that's it. that's the argument 🫢

πŸ”₯ RETURN πŸ”₯

you get back a pointer to the serdev controller that's associated with the node πŸ’œ and if the controller isn't found? you get NULL. nothing. empty. the void. 😭 not found energy.

IMPORTANT bestie, do NOT skip this part: the caller is responsible for calling serdev_controller_put to drop the reference. like, that reference is yours now, you own it, you gotta put it back when you're done. don't just wander off with it, that's not the move πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/tty/serdev/core.c β€” go read it, it's where the magic lives 🧚✨

and then the whole little friend group of related functions, all appearing here so you know they exist:

like a whole friend group of serdev functions, all linked up. iykyk πŸ¦‹πŸ’«


vibe check recap: pass the node, get the controller, NULL if it's not there, and always always always serdev_controller_put when you're done. main character responsibility energy πŸ‘‘πŸ’…

and that's the page!! πŸŽ€ this lil beauty lives in the ./drivers/tty/serdev section of the kernel docs and it's dated October 2026 β€” go off, kernel bestie, you're gonna do amazing with your serdev controllers πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from