STRUCT CHARGER_DESC(9)
π struct charger_desc(9) π
okay so bestie, this is the struct charger_desc(9) page from the Kernel API Manual, and it's giving "here's the whole charger descriptor struct, every field, no cap." π
πΈ NAME πΈ
struct charger_desc β
the original page leaves the one-liner blank after that dash, so no extra lore, no invented tea. The name is the whole snack. π
π¦ SYNOPSIS π¦
struct charger_desc {
const char *psy_name;
enum polling_modes polling_mode;
unsigned int polling_interval_ms;
unsigned int fullbatt_vchkdrop_uV;
unsigned int fullbatt_uV;
unsigned int fullbatt_soc;
unsigned int fullbatt_full_capacity;
enum data_source battery_present;
const char **psy_charger_stat;
int num_charger_regulators;
struct charger_regulator *charger_regulators;
const struct attribute_group **sysfs_groups;
const char *psy_fuel_gauge;
const char *thermal_zone;
int temp_min;
int temp_max;
int temp_diff;
bool measure_battery_temp;
u32 charging_max_duration_ms;
u32 discharging_max_duration_ms;
};
π«Ά Members π«Ά
psy_nameβ the name of power-supply-class for charger manager. literally the charger manager's power-supply-class name, iconic.polling_modeβ tells you which polling mode will be used. vibe check for the polling situation. β¨polling_interval_msβ interval in millisecond at which charger manager will monitor battery health. yes, millisecond, keep it exact bestie.fullbatt_vchkdrop_uVβ check voltage drop after the battery is fully charged. If it has dropped more thanfullbatt_vchkdrop_uV, CM will restart charging. π₯fullbatt_uVβ voltage in microvolt. IfVBATT>=fullbatt_uV, it is assumed to be full.fullbatt_socβ state of Charge in %. If state of Charge >=fullbatt_soc, it is assumed to be full.fullbatt_full_capacityβ full capacity measure. If full capacity of battery >=fullbatt_full_capacity, it is assumed to be full.battery_presentβ specify where information for existence of battery can be obtained. where do we find out if the battery is actually there? this field said "not my problem, I just point." πpsy_charger_statβ the names of power-supply for chargers.charger_regulatorsβ array of charger regulators.psy_fuel_gaugeβ the name of power-supply for fuel gauge.thermal_zoneβ the name of thermal zone for battery.temp_minβ Minimum battery temperature for charging.temp_maxβ Maximum battery temperature for charging.temp_diffβ Temperature difference to restart charging.measure_battery_tempβtrue: measure battery temperature;false: measure ambient temperature.charging_max_duration_msβ Maximum possible duration for charging. If whole charging duration exceedcharging_max_duration_ms, cm stop charging.discharging_max_duration_msβ Maximum possible duration for discharging with charger cable after full-batt. If discharging duration exceeddischarging max_duration_ms, cm start charging.
tiny note, bestie:num_charger_regulatorsandsysfs_groupsare both in the struct above, but the original Members list doesn't give them separate blurbs, so I'm not inventing any. keeping it honest. π«Ά
π SEE ALSO π
The kernel file is ./include/linux/power/charger-manager.h, and it points at struct charger_cable(9), struct charger_regulator(9), and struct charger_manager(9).
mwah π this page says source/version is ./include/linux/power, dated October 2026, and it's all struct charger_desc(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