ab8500_fg_capacity_level(9)
π ab8500_fg_capacity_level β a Kernel API Manual moment (section 9, bestie) π
okay so real talk, this page lives in the Kernel API Manual, section 9, and its whole name is ab8500_fg_capacity_level. yes that's a mouthful. no we're not changing it. it's iconic, it's giving fuel gauge, it's the girl who knows exactly how much battery you have left π¦
β¨ NAME β¨
ab8500_fg_capacity_level β literally just: Get the battery capacity level π
π SYNOPSIS π
int ab8500_fg_capacity_level (struct ab8500_fg *di );
likeβ¦ that's it. that's the whole vibe. one function, one argument, returns an int. periodt π
πΈ ARGUMENTS πΈ
diβ pointer to theab8500_fgstructure. that's the fuel-gauge struct bestie, hand it over and let her cook π«Ά
β DESCRIPTION β
okay so what does she do? Get the battery capacity level based on the capacity in percent. that's the whole job. capacity in percent goes in, capacity level comes out, everyone claps π
no cap, that's genuinely the entire description on this one. short queen. lowkey the whole manpage is like three lines of actual text and fifty lines of SEE ALSO. the way that this page is 90% cross-references π
π¦ SEE ALSO π¦
first up, the source situation β Kernel file ./drivers/power/supply/ab8500_fg.c struct. then the whole friend group, in the exact order they're listed, no gatekeeping:
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_finalize(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_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)
all fifty of them, in original order, nobody left on read π
ngl if you were hoping for warnings, exit statuses, or environment variables on this one β girl, same, but this page simply does not have them. it's a short page and we respect her for it π
alright that's the page!! π
sign-off time: source is ./drivers/power/supply, dated October 2026, part of the Kernel API Manual β and yes, this whole thing is literally ab8500_fg_capacity_level(9) again at the bottom, we went full circle bestie πβ¨π
π¦ 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