devm_extcon_dev_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so this is devm_extcon_dev_register β€” bestie, it's literally the Resource-managed extcon_dev_register() πŸ’… and yes we're in the Kernel API Manual, buckle up πŸŽ€


✨ SYNOPSIS ✨

int devm_extcon_dev_register (struct device *dev , struct extcon_dev
*edev );

like, that's the whole signature, no cap 🌸


🫢 ARGUMENTS 🫢

  • dev β€” the device that owns the extcon device being created πŸ‘‘ it's giving main character energy, it's the parent
  • edev β€” the extcon device that's getting registered, the actual star of the show ⭐

πŸ’– DESCRIPTION πŸ’–

so the whole vibe of this function is: once you register with it, that extcon device gets automatically unregistered on driver detach ✨ like it cleans up after itself, obsessed πŸ§ΉπŸ’…

internally? it just calls extcon_dev_register β€” fr fr that's the real one doing the work. so if you want more info, go refer to that function, iykyk πŸ“–

hmm okay important one πŸ™ˆ β€” if the extcon device was registered with this function and you still need to unregister it separately, you should use devm_extcon_dev_unregister. don't just yolo it, bestie πŸ’€

and the return? Returns 0 if success, or a negative error number if failure 😭 so like, check your return values, please, for me 🫢


🌈 SEE ALSO 🌈

like a whole friend group of devm extcon functions, love that for them πŸ‘―β€β™€οΈπŸ’œ


aaaand that's the page!! 🌸 this one lives in ./drivers/extcon, dated October 2026, and the page itself is devm_extcon_dev_register(9) β€” mwah, slay, periodt πŸ’‹πŸ”₯

πŸ“¦ where this page comes from