STRUCT CHARGER_CABLE(9)
πΈ 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 fromEXTCON(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 ofstruct 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
- 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