extcon_get_extcon_dev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ extcon_get_extcon_dev(9) ✨

okay bestie, welcome to the Kernel API Manual entry for extcon_get_extcon_dev β€” it's a kernel function, it lives in the extcon subsystem, and honestly? it's giving "small function, big responsibilities." πŸ’…


🌸 NAME 🌸

extcon_get_extcon_dev β€” get the extcon device instance from the name. literally that's the whole job, and she does it slayfully 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct extcon_dev * extcon_get_extcon_dev (const char *extcon_name );

πŸŽ€ ARGUMENTS πŸŽ€

  • extcon_name β€” the extcon name that you handed over when you called extcon_dev_register. yes, that exact name. no cap, that's the one it looks up πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea: if it works, you get back the pointer of the extcon device. if it doesn't work? you get ERR_PTR(err). that's it. that's the vibe check. πŸ”₯


⭐ NOTE ⭐

🚨 bestie, listen to me: this function returns -EPROBE_DEFER, so it may only be called from probe functions. like, that's not a suggestion, that's the rule. calling it anywhere else is not the moment πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/extcon/extcon.c, plus the whole extcon friend group:


and that's the page, bestie πŸ“ this gem lives in ./drivers/extcon, dated October 2026 β€” mwah, go write some probes πŸ’‹πŸ§š

πŸ“¦ where this page comes from