extcon_register_notifier(9)
π extcon_register_notifier(9) π
okay bestie, welcome to the Kernel API Manual β todayβs main character is extcon_register_notifier, and she is here to get you hooked up with extcon state-change notifications. no cap. π
β¨ NAME β¨
extcon_register_notifier β register a notifier block to get notified by any state changes from the extcon. literally thatβs the whole vibe. π
πΈ SYNOPSIS πΈ
int extcon_register_notifier (struct extcon_dev *edev , unsigned int id
, struct notifier_block *nb );
π ARGUMENTS π
edevβ the extcon device. your extcon bestie in question. π«Άidβ the unique id indicating an external connector. yes, the one and only id. βnbβ a notifier block to be registered. this is the block that gets its moment. π
π¦ DESCRIPTION π¦
Heads up, bestie: the second parameter given to the callback of nb (val) is the current state of an external connector, and the third pameter is the pointer of extcon device. π yes, keep that mental note close.
Returns 0 if success or an error number if fail. periodt. β¨
okay but fr fr, remember: val = current state of an external connector, third pameter = pointer of extcon device. donβt let the callback girlies confuse you. π
π SEE ALSO π
- 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_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)
mwah π β signed off from the Kernel API Manual, source ./drivers/extcon, date October 2026. slay and read your notifier docs, bestie. π
π¦ 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