extcon_alloc_cables(9)
π extcon_alloc_cables β a Kernel API Manual moment
okay so bestie, welcome to the extcon_alloc_cables(9) page β¨ it lives in the Kernel API Manual and it's honestly a little icon β short, sweet, does exactly one thing. let's get into it π
β¨ NAME β¨
extcon_alloc_cables β alloc the cables for extcon device π¦
like... that's the whole job. it allocates the cables. for the extcon device. periodt π
β¨ SYNOPSIS β¨
int extcon_alloc_cables (struct extcon_dev *edev );
that's it, that's the signature β int coming back atcha, one struct extcon_dev * going in πΈ
β¨ ARGUMENTS β¨
edevβ the extcon device which has cables π literally the device that owns the cables we're out here allocating. if it's got cables, it's the one you pass, iykyk.
β¨ DESCRIPTION β¨
so what actually comes back? Returns 0 if success π«Ά or an error number if fail π β that's it, no cap. 0 = slay, anything else = the vibe check failed and you got an error number instead.
bestie pls actually check that return value. 0 is the good ending π everything else means it didn't work out and the kernel is telling you why with a number.
β¨ SEE ALSO β¨
the whole friend group π«Ά all of these are chilling in the Kernel file ./drivers/extcon/extcon.c:
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_muex(9)extcon_alloc_groups(9)extcon_dev_register(9)extcon_dev_unregister(9)extcon_get_edev_name(9)
like, go read them, they're all iconic in their own way π
and that's the page babes π it ships from ./drivers/extcon, this version is dated October 2026, and honestly? iconic behavior from the kernel docs team. mwah π πβ¨
π¦ 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