STRUCT CHARGER_MANAGER(9)
π 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 ofcharger_desctzd_battβ thermal zone device for battery π₯ (only around whenCONFIG_THERMALsays so)charger_enabledβ the state of charger βemergency_stopβ when setting true, stop charging π like actually, that's the whole dealpsy_name_bufβ the name of power-supply-class for charger manager π (buffer type ischar psy_name_buf[PSY_NAME_MAX + 1], so it's sized for the max plus a terminator, cute)charger_psyβpower_supplyfor 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(astruct 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.hstruct 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
- 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