STRUCT CHARGER_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 than fullbatt_vchkdrop_uV, CM will restart charging. πŸ”₯
  • fullbatt_uV β€” voltage in microvolt. If VBATT >= 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 exceed charging_max_duration_ms, cm stop charging.
  • discharging_max_duration_ms β€” Maximum possible duration for discharging with charger cable after full-batt. If discharging duration exceed discharging max_duration_ms, cm start charging.
tiny note, bestie: num_charger_regulators and sysfs_groups are 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