extcon_set_state_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 literally true: attached / false: detached. so true = they're together πŸ’– and false = 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.

Returns 0 if success or error number if fail. so 0 = 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