STRUCT AB8500_BM_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct ab8500_bm_data β€” ab8500 battery management data. Bestie, this is the struct, the main character of the AB8500 battery management world πŸ‘‘. It's basically the driver's whole brain: every battery parameter, every flag, every pointer it needs to keep track of, all chilling in one struct. Let's do a member-by-member vibe check 🧚:

  • @bi β€” battery info, pulled straight from the device tree 🌳
  • @temp_now β€” the present battery temperature, like, right now rn 🌑️
  • @temp_interval_chg β€” temperature measurement interval, in s, when charging
  • @temp_interval_nochg β€” temperature measurement interval, in s, when not charging
  • @main_safety_tmr_h β€” safety timer for the main charger ⏰
  • @usb_safety_tmr_h β€” safety timer for the usb charger
  • @bkup_bat_v β€” the voltage which we charge the backup battery with
  • @bkup_bat_i β€” the current which we charge the backup battery with
  • @capacity_scaling β€” indicates whether capacity scaling is to be used
  • @chg_unknown_bat β€” flag to enable charging of unknown batteries
  • @enable_overshoot β€” flag to enable VBAT overshoot control
  • @auto_trig β€” flag to enable auto adc trigger
  • @fg_res β€” resistance of the FG resistor, in 0.1mOhm (yes, 0.1mOhm, read it again) πŸ”₯
  • @interval_charging β€” charge alg cycle period time when charging (sec)
  • @interval_not_charging β€” charge alg cycle period time when not charging (sec)
  • @temp_hysteresis β€” temperature hysteresis
  • @maxi β€” maximization parameters
  • @cap_levels β€” capacity in percent for the different capacity levels
  • @chg_params β€” charger parameters
  • @fg_params β€” fuel gauge parameters

Not me listing twenty members and still being obsessed πŸ’….


✨ SYNOPSIS ✨

Okay so here's the actual shape of it, copied exactly, no cap:

struct ab8500_bm_data {
    struct power_supply_battery_info *bi;
    int temp_now;
    int temp_interval_chg;
    int temp_interval_nochg;
    int main_safety_tmr_h;
    int usb_safety_tmr_h;
    int bkup_bat_v;
    int bkup_bat_i;
    bool capacity_scaling;
    bool chg_unknown_bat;
    bool enable_overshoot;
    bool auto_trig;
    int fg_res;
    int interval_charging;
    int interval_not_charging;
    int temp_hysteresis;
    const struct ab8500_maxim_parameters *maxi;
    const struct ab8500_bm_capacity_levels *cap_levels;
    const struct ab8500_bm_charger_parameters *chg_params;
    const struct ab8500_fg_parameters *fg_params;
 };

Notice how the last four are const pointers to other structs? Yeah, they're just referencing their friends, we love a collaborative queen 🫢.

Members

So the Members section here is, uh… empty. Like genuinely nothing in it πŸ’€. Not me being lazy, I promise β€” that's just how the source page is. Everything you want is already up in NAME, so we ate anyway πŸ“.


🌈 SEE ALSO 🌈

Go touch some grass and read these, iykyk:

  • Kernel file ./drivers/power/supply/ab8500-bm.h
  • struct ab8500_fg_parameters(9)
  • struct ab8500_bm_capacity_levels(9)
  • struct ab8500_bm_charger_parameters(9)

That's the whole page, bestie! ✨ Compiled with love from ./drivers/power/supply, dated October 2026 β€” slay, see you in the next one πŸ’œπŸ¦‹

πŸ“¦ where this page comes from