fw_devlink_create_devlink(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual β€” this one's a kernel-internal little icon and she's here to set up a device link between a consumer and her supplier 🫢


🌸 NAME 🌸

fw_devlink_create_devlink β€” lowkey the function that creates a device link from a consumer to fwnode πŸ’–


✨ SYNOPSIS ✨

int fw_devlink_create_devlink (struct device *con , struct fwnode_handle
*sup_handle , struct fwnode_link *link );

πŸŽ€ ARGUMENTS πŸŽ€

  • con β€” the consumer device for the device link, she's the one doing the consuming πŸ‘‘
  • sup_handle β€” the fwnode handle of the supplier, i.e. the one doing the supplying 🧚
  • link β€” the fwnode link that's being converted to a device link, glow-up in progress πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so the whole vibe here is: this function will try to create a device link between the consumer device con and the supplier device represented by sup_handle ✨

and like β€” the supplier has to be provided as a fwnode, and there's a real reason for that, no cap. incorrect cycles in fwnode links can sometimes cause the supplier device to never be created 😭 not iconic. so this function detects those cases and returns an error if it cannot create a device link from the consumer to a missing supplier πŸ’€

here's the return tea, fr fr:

  • 0 β€” on successfully creating a device link, slay πŸŽ‰
  • -EINVAL β€” if the device link cannot be created as expected, big sad πŸ™ˆ
  • -EAGAIN β€” if the device link cannot be created right now, but it may be possible to do that in the future. it's not a no, it's a "not yet" ⭐

🌈 SEE ALSO 🌈

she's in the Kernel file ./drivers/base/core.c, and the friend group is extensive, bestie. like, enormous. buckle up 🎒

like I said. extensive. πŸ’€πŸ’–


real talk: the cycle-detection bit is not a vibe to ignore β€” a missing supplier is a genuine error case here, so don't go assuming a link always gets made 🫢

okay that's the whole page, bestie!! this one came out of ./drivers/base in October 2026, filed under fw_devlink_create_devlink(9) β€” go forth and link responsibly πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from