STRUCT AB8500_BM_DATA(9)
π 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
- 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