STRUCT AB8500_FG_PARAMETERS(9)
π struct ab8500_fg_parameters(9) β the full glow-up
okay so this is a page from the Kernel API Manual, and it's literally all about struct ab8500_fg_parameters β the fuel gauge algorithm parameters, bestie. every value is in seconds unless it says otherwise (yes, the page says that up front, iconic of it).
β¨ NAME β¨
struct ab8500_fg_parameters β Fuel gauge algorithm parameters, in seconds if not specified π«Ά
π SYNOPSIS π
struct ab8500_fg_parameters {
int recovery_sleep_timer;
int recovery_total_time;
int init_timer;
int init_discard_time;
int init_total_time;
int high_curr_time;
int accu_charging;
int accu_high_curr;
int high_curr_threshold_ua;
int lowbat_threshold_uv;
int battok_falling_th_sel0;
int battok_raising_th_sel1;
int user_cap_limit;
int maint_thres;
bool pcut_enable;
u8 pcut_max_time;
u8 pcut_flag_time;
u8 pcut_max_restart;
u8 pcut_debounce_time;
};
like, look at her. a whole little family of ints and a few u8s. no cap, she's serving struct. π
πΈ Members πΈ
okay bestie, member-by-member, and we're not skipping a single one:
recovery_sleep_timerβ the time between measurements while recovering π΄recovery_total_timeβ the total recovery time, start to finishinit_timerβ the measurement interval during startup β±οΈinit_discard_timeβ the time we discard voltage measurement at startup (throwing it out, we don't want it)init_total_timeβ the total init time during startuphigh_curr_timeβ how long the current has to be high before we go to recovery π₯accu_chargingβ the FG accumulation time while charging πaccu_high_currβ it's right there in the struct, but this page doesn't hand it its own blurb. iykyk, moving on πhigh_curr_threshold_uaβ the high current threshold, in uAlowbat_threshold_uvβ the low battery threshold, in uVbattok_falling_th_sel0β the threshold in mV for the battOk signalsel0; resolution in 50 mV steps.battok_raising_th_sel1β the threshold in mV for the battOk signalsel1; resolution in 50 mV steps.user_cap_limitβ the capacity reported from the user has to be within this limit to be considered sane, in percentage points (fr fr, sane or nothing)maint_thresβ the threshold where we stop reporting battery full while in maintenance, in per cent πpcut_enableβ enables the power cut feature in ab8505 βοΈpcut_max_timeβ the max time thresholdpcut_flag_timeβ the flagtime threshold π©pcut_max_restartβ the max number of restartspcut_debounce_timeβ sets the battery debounce time
ngl, that run ofbattok/user_cap_limit/maint_thresentries is exactly the kind of thing that gets squished together in a raw manpage. we've un-squished them here, but every threshold, unit and step size is untouched. π
π¦ SEE ALSO π¦
go read these next, bestie, they're the friend group:
- the Kernel file
./drivers/power/supply/ab8500-bm.h struct ab8500_bm_capacity_levels(9)struct ab8500_bm_charger_parameters(9)struct ab8500_bm_data(9)
β the sign-off β
this little masterpiece lives in ./drivers/power/supply, it's dated October 2026, and it answers to struct ab8500_fg_parameters(9). that's the whole page β you ate, you slayed, go read ab8500-bm.h now. periodt. πβ¨π
π¦ 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