extcon_set_state_sync(9)
π extcon_set_state_sync(9) π
ok bestie come CLOSER, we're diving into the Kernel API Manual and this one's a little function that does a big slay. It's giving "set the state of an external connector with sync" and honestly? iconic.
β¨ NAME β¨
extcon_set_state_sync β Set the state of an external connector with sync. periodt. π
πΈ SYNOPSIS πΈ
int extcon_set_state_sync (struct extcon_dev *edev , unsigned int id ,
bool state );
like look at that signature. chef's kiss. no cap.
π¦ ARGUMENTS π¦
edevβ the extcon device, aka the main character of this whole situation π«Άidβ the unique id that points at one specific external connector. it's the little name tag, iykyk πstateβ the new state of the external connector. the default semantics is literallytrue: attached /false: detached. sotrue= they're together π andfalse= it's giving distance π
π₯ DESCRIPTION π₯
okay so real talk β note that this function sets the state of the external connector and synchronizes the state by sending a notification. it doesn't just change the vibe quietly, it tells everyone. lowkey the most extroverted function in the file.
Returns0if success or error number if fail. so0= slay, anything else = check yourself bestie π
π SEE ALSO π
Kernel file ./drivers/extcon/extcon.c struct extcon_cable(9), extcon_sync(9), extcon_get_state(9), extcon_set_state(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_register(9), extcon_dev_unregister(9), extcon_get_edev_name(9)
the whole friend group fr fr π
and that's the page! brought to you by the fine folks at ./drivers/extcon, dated October 2026, manual name extcon_set_state_sync(9). go forth and sync your states bestie, ily, bye π§π
π¦ 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