ab8500_fg_in...urr_finalize(9)
π ab8500_fg_inst_curr_finalize(9) β the Kernel API Manual glow-up π
okay so bestie, welcome to the <pink>Kernel API Manual</pink> page for ab8500_fg_inst_curr_finalize(9) β yes that's the whole name, she's long, she's iconic, she's a 9-section function and we're gonna get through her together. grab a lil snack π, this one's short but it's part two of a duo so you need the lore.
β¨ NAME β¨
ab8500_fg_inst_curr_finalize β battery instantaneous current
literally that's the whole vibe. it finalizes the instantaneous current reading. π
πΈ SYNOPSIS πΈ
int ab8500_fg_inst_curr_finalize (struct ab8500_fg *di , int *curr_ua );
it gives you back an int, which is either 0 or an error code (more on that in a sec, don't panic π«Ά).
π¦ ARGUMENTS π¦
diβ pointer to theab8500_fgstructure. that's your fg context bestie, hand her over.curr_uaβ battery instantenous current in microampere (on success). yes that's spelled "instantenous" in the original and yes we're keeping it verbatim, don't come for me π. this is where the answer lands, but only if you slayed (i.e. succeeded).
β DESCRIPTION β
Returns 0 or an error code.
that's it. that's the description. short king behavior honestly π β you call her, she either says "we're so good" (0) or hands you an error code. no cap.
π NOTE π
This is part "two" and has to be called at earliest 250 ms after ab8500_fg_inst_curr_start
fr fr, do NOT call her early. she is part two of a two-parter, and the earliest you may call her is 250 ms after ab8500_fg_inst_curr_start. like, give the girl 250 ms to breathe. calling too soon is not the move π₯.
π SEE ALSO π
Kernel file ./drivers/power/supply/ab8500_fg.c β go read the source, iykyk π
and the whole friend group, in the order the page gives them:
struct ab8500_fg_interrupts(9)struct ab8500_fg(9)ab8500_fg_get(9)ab8500_fg_is_low_curr(9)ab8500_fg_add_cap_sample(9)ab8500_fg_clear_cap_samples(9)ab8500_fg_fill_cap_sample(9)ab8500_fg_coulomb_counter(9)ab8500_fg_inst_curr_start(9)ab8500_fg_inst_curr_started(9)ab8500_fg_inst_curr_done(9)ab8500_fg_inst_curr_blocking(9)ab8500_fg_acc_cur_work(9)ab8500_fg_bat_voltage(9)ab8500_fg_volt_to_capacity(9)ab8500_fg_uncomp_volt_to_capacity(9)ab8500_fg_battery_resistance(9)ab8500_load_comp_fg_bat_voltage(9)ab8500_fg_load_comp_volt_to_capacity(9)ab8500_fg_convert_mah_to_permille(9)ab8500_fg_convert_permille_to_mah(9)ab8500_fg_convert_mah_to_uwh(9)ab8500_fg_calc_cap_charging(9)ab8500_fg_calc_cap_discharge_voltage(9)ab8500_fg_calc_cap_discharge_fg(9)ab8500_fg_capacity_level(9)ab8500_fg_calculate_scaled_capacity(9)ab8500_fg_update_cap_scalers(9)ab8500_fg_check_capacity_limits(9)ab8500_fg_algorithm_charging(9)ab8500_fg_algorithm_discharging(9)ab8500_fg_algorithm_calibrate(9)ab8500_fg_algorithm(9)ab8500_fg_periodic_work(9)ab8500_fg_check_hw_failure_work(9)ab8500_fg_low_bat_work(9)ab8500_fg_battok_calc(9)ab8500_fg_battok_init_hw_register(9)ab8500_fg_instant_work(9)ab8500_fg_cc_data_end_handler(9)ab8500_fg_cc_int_calib_handler(9)ab8500_fg_cc_convend_handler(9)ab8500_fg_batt_ovv_handler(9)ab8500_fg_lowbatf_handler(9)ab8500_fg_get_property(9)ab8500_fg_init_hw_registers(9)ab8500_fg_external_power_changed(9)ab8500_fg_reinit_work(9)ab8500_fg_sysfs_exit(9)ab8500_fg_sysfs_init(9)
and that's the page!! π§ this lil gem lives over in ./drivers/power/supply, dated October 2026, and the whole thing goes out under the title ab8500_fg_inst_curr_finalize(9) in the Kernel API Manual. go finalize that current bestie, 250 ms minimum, no shortcuts πβ¨πΈπ«Ά
π¦ 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