STRUCT CHARGER_CABLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to struct charger_cable(9) from the Kernel API Manual ✨ β€” and yes, the original NAME section is literally struct charger_cable - with nothing after the dash. no cap, there is no one-line description here, so we are not inventing one. this page is just here to introduce the C struct itself, and we're gonna keep every field and every member description exactly as the manpage gives them πŸ’…

✨ SYNOPSIS ✨

here's the struct in all its glory β€” copy-paste exact, no edits:

       struct charger_cable {
           const char *extcon_name;
           const char *name;
           struct extcon_dev *extcon_dev;
           u64 extcon_type;
           struct work_struct wq;
           struct notifier_block nb;
           bool attached;
           struct charger_regulator *charger;
           int min_uA;
           int max_uA;
           struct charger_manager *cm;
        };

πŸŽ€ Members πŸŽ€

okay so these are the members the original page actually describes. (the synopsis also has extcon_type, min_uA, and max_uA; the original Members list doesn't describe those, so we're not making up lore for them πŸ™ˆ)

  • extcon_name β€” the name of the extcon device. literally that.
  • name β€” the name of the cable connector.
  • extcon_dev β€” the extcon device.
  • wq β€” the workqueue that controls the charger according to the state of the charger cable. if the charger cable is attached, it enables the charger; but if the charger cable is detached, it disables the charger. slay for power management πŸ”₯
  • nb β€” the notifier block that receives changed state from EXTCON (External Connector) when the charger cable is attached/detached. it's giving "I be listening" πŸ‘€
  • attached β€” the state of the charger cable. true: the charger cable is attached. false: the charger cable is detached. very binary of it πŸ’…
  • charger β€” the instance of struct charger_regulator.
  • cm β€” the Charger Manager representing the battery. main character energy fr fr πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/power/charger-manager.h β€” struct charger_regulator(9), struct charger_desc(9), struct charger_manager(9). go read those next, bestie, iykyk πŸ’–


mwah πŸ’‹ cute little sign-off: this page's source/version is ./include/linux/power, its date is October 2026, and the title is struct charger_cable(9). bye bestie, go charge something 🫢✨

πŸ“¦ where this page comes from