STRUCT AB8500_CHARGALG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct ab8500_chargalg(9) ✨

okay so bestie, lemme tell you about this kernel API manual thing, it's giving very much "charging algorithm device information" energy and honestly? it's iconic πŸ’… this is from the Linux Kernel API Manual, and we're about to dive into the struct ab8500_chargalg like it's the main character, because it literally is πŸŽ€


πŸ’– NAME πŸ’–

struct ab8500_chargalg β€” ab8500 Charging algorithm device information, no cap, that's literally what it is bestie ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole vibe, the entire struct, every single field, and like... it's a LOT but we're gonna get through it together, i promise 🫢

struct ab8500_chargalg {
    struct device *dev;
    int charge_status;
    int eoc_cnt;
    bool maintenance_chg;
    int t_hyst_norm;
    int t_hyst_lowhigh;
    enum ab8500_chargalg_states charge_state;
    struct ab8500_charge_curr_maximization ccm;
    struct ab8500_chargalg_charger_info chg_info;
    struct ab8500_chargalg_battery_data batt_data;
    struct ab8500 *parent;
    struct ab8500_bm_data *bm;
    struct power_supply *chargalg_psy;
    struct ux500_charger *ac_chg;
    struct ux500_charger *usb_chg;
    struct ab8500_chargalg_events events;
    struct workqueue_struct *chargalg_wq;
    struct delayed_work chargalg_periodic_work;
    struct delayed_work chargalg_wd_work;
    struct work_struct chargalg_work;
    struct hrtimer safety_timer;
    struct hrtimer maintenance_timer;
    struct kobject chargalg_kobject;
};

like, look at all those fields, it's giving organized chaos and we love to see it πŸ”₯


🌸 Members 🌸

okay bestie, time for the member-by-member breakdown, and there are like a million of them but every single one matters, periodt πŸ’œ

  • dev β€” pointer to the structure device, super important, it's the whole reason we're here tbh πŸŽ€
  • charge_status β€” battery operating status, like how's the battery doing, is it thriving or surviving, this tells you πŸ’–
  • eoc_cnt β€” counter used to determine end-of_charge (yes with the underscore, don't @ me, that's literally what it says), it's counting down to the end bestie ⭐
  • maintenance_chg β€” indicate if maintenance charge is active, like is the maintenance charge currently doing its thing, yes or no, that's the vibe 🌈
  • t_hyst_norm β€” temperature hysteresis when the temperature has been over or under normal limits, it's giving temperature drama and this is the hysteresis for when things are normal-ish but like, borderline πŸ™ˆ
  • t_hyst_lowhigh β€” temperature hysteresis when the temperature has been over or under the high or low limits, so when things get EXTREME, this is the hysteresis you need to know about πŸ”₯
  • charge_state β€” current state of the charging algorithm, like what chapter are we in, what's the plot rn, this tells you the state bestie πŸ‘‘
  • ccm β€” charging current maximization parameters, it's all about maximizing that charging current, we love efficiency here πŸ’…
  • chg_info β€” information about connected charger types, like what chargers are plugged in, what's the situation, this has the tea β˜•
  • batt_data β€” data of the battery, all the battery info you could ever want, it's giving data-rich and we're obsessed πŸ“
  • parent β€” pointer to the struct ab8500, it's the parent struct, the OG, the one that came before, respect the elders fr fr 🧚
  • bm β€” Platform specific battery management information, platform specific means it's tailored, it's custom, it's special, and it's all about battery management πŸ’œ
  • chargalg_psy β€” structure that holds the battery properties exposed by the charging algorithm, like these are the properties the charging algorithm is showing to the world, it's giving public-facing and proud ✨
  • ac_chg β€” AC charger power supply, the AC charger, the plug-in-the-wall situation, very important for charging obviously 😭
  • usb_chg β€” USB charger power supply, the USB charger, the plug-into-your-laptop situation, equally important, we stan both 🫢
  • events β€” structure for information about events triggered, like what events happened, what's the lore, this has the receipts 🌸
  • chargalg_wq β€” work queue for running the charging algorithm, it's the queue where the work happens, the charging algorithm's workspace, iconic behavior πŸ’–
  • chargalg_periodic_work β€” work to run the charging algorithm periodically, so like, on a schedule, regularly, periodically, you get it πŸŽ€
  • chargalg_wd_work β€” work to kick the charger watchdog periodically, kicking the watchdog, keeping it alive, making sure it doesn't fall asleep, very important work honestly πŸ¦‹
  • chargalg_work β€” work to run the charging algorithm instantly, no waiting, no delay, instant, immediately, right now, that's the vibe ⚑
  • safety_timer β€” charging safety timer, it's a timer for safety, keeping things safe, we love safety here at the charging algorithm household πŸ’…
  • maintenance_timer β€” maintenance charging timer, a timer for maintenance charging, keeping the maintenance charge on schedule, very organized 🌟
  • chargalg_kobject β€” structure of type kobject, it's a kobject, that's what it is, a structure of type kobject, and that's the whole description, no notes πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

okay so if you wanna go deeper (and honestly why wouldn't you), here's the whole squad, the entire friend group of related functions and files, and they're all linked below bestie πŸ’–

like, that's the whole crew, every single one, no skips, no cap 🧚✨


okay so real talk bestie, this manual page is from the Linux Kernel API Manual, and it's all about that struct ab8500_chargalg life, which is literally the charging algorithm device information for the ab8500, and if you're deep in the kernel power supply game, you already know, iykyk πŸ’…

source file vibe check: ./drivers/power/supply β€” version date: October 2026 β€” that's the whole footer situation, and honestly? iconic. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from