set_primary_fwnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ set_primary_fwnode(9) ✨

okay so this is a page from the Kernel API Manual, and bestie, it's a short one but it's lowkey important β€” it's all about who gets to be the main character firmware node of a device πŸ’…


🌸 NAME 🌸

set_primary_fwnode β€” Change the primary firmware node of a given device.

Like, you're literally swapping out the headliner. No cap.


πŸŽ€ SYNOPSIS πŸŽ€

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

It returns void, so don't go looking for a return value, there isn't one, periodt.


πŸ’– ARGUMENTS πŸ’–

  • dev β€” Device to handle. This is the one getting a whole new primary firmware node, she's the main character here.
  • fwnode β€” New primary firmware node of the device. The fresh face taking the top spot.

πŸ¦‹ DESCRIPTION πŸ¦‹

Set the device's firmware node pointer to fwnode, but if a secondary firmware node of the device is present, preserve it. 🫢

Translation: fwnode becomes the primary, but if there's already a secondary hanging around, she stays β€” nobody's getting evicted today bestie.

Valid fwnode cases are:

  • primary --> secondary --> -ENODEV
  • primary --> NULL
  • secondary --> -ENODEV
  • NULL

Those are the only vibes that pass the vibe check, iykyk. Everything else? Not on the list πŸ™ˆ


🌈 SEE ALSO 🌈

The whole friend group, fr fr β€” like genuinely a lot of them, and yes we're listing every single one because leaving people out is rude πŸ’€

ngl if you read all 76 of those you're iconic and also maybe touch some grass 🌱 but ily for it

πŸ‘‘ the cute sign-off πŸ‘‘

This one lives in ./drivers/base, it's dated October 2026, and it's from the pages of that Kernel API Manual we mentioned at the top πŸ’œ That's the whole page bestie β€” stay slay, read your manpages, and may your firmware node always be primary βœ¨πŸŽ€

πŸ“¦ where this page comes from