extcon_dev_register(9)
π extcon_dev_register(9) β Kernel API Manual π
okay so bestie, this one is a kernel API page β extcon_dev_register(9), straight out of the Kernel API Manual β and it's literally the moment your new extcon device gets β¨registeredβ¨ into existence. Let's get into it π«Ά
πΈ NAME πΈ
extcon_dev_register β Register an new extcon device π
(yes the original says "an new", we're keeping that energy, it's iconic π )
π¦ SYNOPSIS π¦
int extcon_dev_register (struct extcon_dev *edev );
π ARGUMENTS π
edevβ the extcon device that's about to be registered, bestie. this is the main character of the whole call π
β¨ DESCRIPTION β¨
okay so here's the tea π΅ among all the members of the edev struct, please set the "user initializing data" β but do not set the values of the "internal data", because those get initialized by this function itself. like, this function handles its own business, don't touch it π
π also note: before you call this function, you have to allocate the memory of an extcon device by usingextcon_dev_allocate. no allocation, no registration, no cap. and the extcon dev should include thesupported_cableinformation too β that's not optional, that's the vibe check π
Returns 0 if it slays (success) or an error number if it fails π
π₯ SEE ALSO π₯
Kernel file ./drivers/extcon/extcon.c β plus the whole 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_get_extcon_dev(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_unregister(9)extcon_get_edev_name(9)
mwah π that's the whole page, and it lives at ./drivers/extcon with the date October 2026 β so go forth, register your devices, and remember: set the user data, let the kernel handle the internals. slay πβ¨
π¦ 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