extcon_register_notifier(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌈


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