__fw_devlink...to_suppliers(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, you found yourself a (9) page from the Kernel API Manual, and honestly? this one is lowkey iconic. it's all about matching up a device with the things that feed it. let's get into it πŸ’…


🌸 NAME 🌸

__fw_devlink_link_to_suppliers β€” creating device links to the suppliers of a device. that's the whole vibe. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

void __fw_devlink_link_to_suppliers(struct device *dev, struct fwnode_handle *fwnode);

like, that's it. two args. she's simple. she's doing her job. periodt.


πŸ’– ARGUMENTS πŸ’–

  • dev β€” the consumer device, aka the one that needs to be linked up to its suppliers. she's the main character here, we're finding her people 🫢
  • fwnode β€” the root of the fwnode tree that gets used to create the device links. think of it as the starting point of the whole family tree 🌳

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do? she looks at all the supplier fwnodes in the fwnode tree rooted at fwnode, and then creates device links between dev (our consumer) and all the supplier devices of that entire fwnode tree at fwnode. the way that she just goes and links everybody up 😭 iconic behaviour.

here's the breakdown, bestie:

  • she creates normal device links β€” as in, not SYNC_STATE_ONLY ones β€” between dev and the real suppliers of dev. no fake ones, these are the genuine article πŸ’―
  • once those device links are created, the fwnode links get deleted. gone. she's done with them 😌

and then, because she's thorough (like, scarily thorough), she also looks at all the suppliers of the entire fwnode tree. why? because some of the child devices of dev that haven't been added yet β€” and they haven't been added because dev hasn't probed yet β€” might already have their suppliers added to driver core. so for those, she creates SYNC_STATE_ONLY device links between dev (consumer) and those suppliers. this is her making sure they don't go running their sync_state callbacks before these child devices even get a chance to create their own device links. protecting the timeline. respecting the order of operations πŸ‘‘

and the fwnode links that correspond to the child devices? those aren't deleted β€” they're needed later to create the device links between the real consumer and supplier devices. she's saving them for later, as she should 🌈

⭐ SEE ALSO ⭐

the whole group chat, fr fr. kernel file ./drivers/base/core.c plus a lot of friends:

like I said. a lot of friends. she's well connected 🧚


πŸ’œ sign-off πŸ’œ

that's the page bestie!! it lives over in ./drivers/base, it's dated October 2026, and it's part of the Kernel API Manual β€” same manual name as the title up top, which we folded in so you didn't have to read it twice 😌 go forth and link your suppliers, you absolute icon πŸ“πŸ’–βœ¨

πŸ“¦ where this page comes from