STRUCT CHARGER_MANAGER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct charger_manager β€” okay so bestie, this is the manual page for it from the Kernel API Manual, and ngl the NAME line is out here giving absolutely nothing 😭 no description, no trailer, just the struct name and vibes. Iconic of it, honestly. So let's get into what's actually inside this thing.


✨ SYNOPSIS ✨

Here's the whole struct, copy-pasted with love, character for character:

struct charger_manager {
    struct list_head entry;
    struct device *dev;
    struct charger_desc *desc;
  #ifdef CONFIG_THERMAL;
    struct thermal_zone_device *tzd_batt;
  #endif;
    bool charger_enabled;
    int emergency_stop;
    char psy_name_buf[PSY_NAME_MAX + 1];
    struct power_supply_desc charger_psy_desc;
    struct power_supply *charger_psy;
    u64 charging_start_time;
    u64 charging_end_time;
    int battery_status;
 };

Notice tzd_batt is wrapped in #ifdef CONFIG_THERMAL; … #endif; β€” so if thermal config isn't on, that field simply does not exist. Lowkey a little main character of the preprocessor 🫢


πŸŽ€ MEMBERS πŸŽ€

Time for the roster. Every field, one by one, no skips:

  • entry β€” entry for list πŸ’… (yes bestie, it's a list entry, that's the whole job)
  • dev β€” device pointer 🌸
  • desc β€” instance of charger_desc
  • tzd_batt β€” thermal zone device for battery πŸ”₯ (only around when CONFIG_THERMAL says so)
  • charger_enabled β€” the state of charger ⭐
  • emergency_stop β€” when setting true, stop charging πŸ’€ like actually, that's the whole deal
  • psy_name_buf β€” the name of power-supply-class for charger manager πŸŽ€ (buffer type is char psy_name_buf[PSY_NAME_MAX + 1], so it's sized for the max plus a terminator, cute)
  • charger_psy β€” power_supply for charger manager πŸ”‹
  • charging_start_time β€” saved start time of enabling charging ⏰
  • charging_end_time β€” saved end time of disabling charging ⏰
  • battery_status β€” Current battery status πŸ‘‘
Heads up bestie: charger_psy_desc (a struct power_supply_desc) is def in the struct up in the synopsis, but this Members list doesn't hand it a description. So no cap, I'm not gonna invent one for it β€” it's just there, living its truth πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Go read these next, fr fr:

  • Kernel file ./include/linux/power/charger-manager.h struct
  • charger_cable(9)
  • charger_regulator(9)
  • charger_desc(9)

That's the whole page, bestie, you ate that πŸ’…βœ¨

Sign-off time: this one lives over in ./include/linux/power, and it's stamped October 2026. Go forth and manage those chargers πŸ˜­πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from