extcon_get_extcon_dev(9)
β¨ 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 calledextcon_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:
struct extcon_cable(9)extcon_sync(9)extcon_get_state(9)extcon_set_state(9)extcon_set_state_sync(9)extcon_get_property(9)extcon_set_property(9)extcon_set_property_sync(9)extcon_get_property_capability(9)extcon_set_property_capability(9)extcon_register_notifier(9)extcon_unregister_notifier(9)extcon_register_notifier_all(9)extcon_unregister_notifier_all(9)extcon_alloc_cables(9)extcon_alloc_muex(9)extcon_alloc_groups(9)extcon_dev_register(9)extcon_dev_unregister(9)extcon_get_edev_name(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms