ab8500_fg_instant_work(9)
๐ ab8500_fg_instant_work โ bestie, let's run that FG state machine instantly ๐
Okay so real talk, the manual name is ab8500_fg_instant_work(9) and this is literally the group chat for your kernel's fuel gauge. No cap, this one is short and sweet but it's giving main character energy in the battery management saga. โจ
๐ธ SYNOPSIS ๐ธ
void ab8500_fg_instant_work (struct work_struct *work);
Like, that's the whole vibe. A void return, one pointer, and we're out. Periodt. ๐
๐ ARGUMENTS ๐
workโ pointer to thework_structstructure. It's the work item being queued up. Bestie, you gotta hand it the actualwork_structpointer or it's not gonna know what to run, iykyk. ๐ซถ
โจ DESCRIPTION โจ
So what does this icon actually do? It's the work queue function for instant work. That's the whole tea. โ
Like, it's the callback that gets invoked when the instant work gets scheduled, and it runs the FG state machine instantly. No waiting around, no "I'll do it later" energyโthis is the "do it now" function. Main character behavior only. ๐
Honestly? It's giving "just a work queue function" but we stan a reliable callback. ๐
๐ฅ SEE ALSO ๐ฅ
Okay bestie, buckle up because this list is long and we're not skipping a single one. Every single reference matters, fr fr. These are all chilling in the kernel file ./drivers/power/supply/ab8500_fg.c:
ab8500_fg_interrupts(9)โ the interrupt squad ๐จstruct ab8500_fg(9)โ the main character struct itself ๐ฆab8500_fg_get(9)โ get that data ๐ab8500_fg_is_low_curr(9)โ vibe check on the current being low ๐ธab8500_fg_add_cap_sample(9)โ adding capacity samples, we love to see it โจab8500_fg_clear_cap_samples(9)โ clearing them out, fresh start ๐งนab8500_fg_fill_cap_sample(9)โ filling those samples up ๐ab8500_fg_coulomb_counter(9)โ coulomb counting, the science of it all โกab8500_fg_inst_curr_start(9)โ start that instant current measurement ๐ab8500_fg_inst_curr_started(9)โ did it start though? ๐ab8500_fg_inst_curr_done(9)โ and we're done with it โab8500_fg_inst_curr_finalize(9)โ wrap it up, finalize the instant current ๐ab8500_fg_inst_curr_blocking(9)โ the blocking version, it waits ๐คab8500_fg_acc_cur_work(9)โ accumulator current work, get it ๐ab8500_fg_bat_voltage(9)โ battery voltage, the classic ๐ab8500_fg_volt_to_capacity(9)โ converting voltage to capacity, math slay ๐งฎab8500_fg_uncomp_volt_to_capacity(9)โ the uncompensated version, fancy ๐ฉab8500_fg_battery_resistance(9)โ resistance, it's giving physics ๐งชab8500_load_comp_fg_bat_voltage(9)โ load compensated battery voltage, obsessed ๐ฏab8500_fg_load_comp_volt_to_capacity(9)โ load compensated voltage to capacity, we love a conversion ๐ab8500_fg_convert_mah_to_permille(9)โ mAh to permille, unit glow-up ๐ab8500_fg_convert_permille_to_mah(9)โ permille back to mAh, we go both ways ๐ซab8500_fg_convert_mah_to_uwh(9)โ mAh to uWh, energy math bestie โกab8500_fg_calc_cap_charging(9)โ calculating capacity while charging ๐ab8500_fg_calc_cap_discharge_voltage(9)โ discharge capacity via voltage, iconic ๐ab8500_fg_calc_cap_discharge_fg(9)โ discharge capacity via fuel gauge, the other iconic one ๐ab8500_fg_capacity_level(9)โ what level is the capacity at? ๐คab8500_fg_calculate_scaled_capacity(9)โ scaled capacity, make it make sense ๐ab8500_fg_update_cap_scalers(9)โ update those scalers, keep it fresh ๐ab8500_fg_check_capacity_limits(9)โ checking the limits, set those boundaries ๐งab8500_fg_algorithm_charging(9)โ the charging algorithm, it's giving strategy ๐งab8500_fg_algorithm_discharging(9)โ discharging algorithm, opposite energy ๐ชซab8500_fg_algorithm_calibrate(9)โ calibrate it, precision queen ๐ฏab8500_fg_algorithm(9)โ the algorithm itself, the blueprint ๐ab8500_fg_periodic_work(9)โ periodic work, it comes back around ๐ab8500_fg_check_hw_failure_work(9)โ hardware failure check, safety first โ ๏ธab8500_fg_low_bat_work(9)โ low battery work, the warning squad ๐ชซab8500_fg_battok_calc(9)โ battery OK calculation, is it okay bestie? โab8500_fg_battok_init_hw_register(9)โ init the battok HW register, setup era ๐งab8500_fg_cc_data_end_handler(9)โ coulomb counter data end handler ๐ab8500_fg_cc_int_calib_handler(9)โ CC interrupt calibration handler ๐๏ธab8500_fg_cc_convend_handler(9)โ CC conversion end handler ๐ab8500_fg_batt_ovv_handler(9)โ battery overvoltage handler, yikes โกab8500_fg_lowbatf_handler(9)โ low battery flag handler ๐ฉab8500_fg_get_property(9)โ get that property, power supply core style ๐ab8500_fg_init_hw_registers(9)โ init those HW registers, setup szn ๐ ๏ธab8500_fg_external_power_changed(9)โ external power changed, adapt babe ๐ab8500_fg_reinit_work(9)โ reinit work, do it again ๐ab8500_fg_sysfs_exit(9)โ sysfs exit, bye bestie ๐ab8500_fg_sysfs_init(9)โ sysfs init, hello bestie ๐
And yes, all of these are in ./drivers/power/supply/ab8500_fg.c. The whole friend group lives there. ๐
๐ Tiny reminder: this is a work queue function, so it's meant to be scheduled and run by the workqueue, not called directly by you. Let the work_struct do its thing, bestie. She knows what she's doing. ๐
Okay that's the page! Like, it's just one function doing its job in the ab8500 fuel gauge family, but we love her for it. If you need the full deets, the source is ./drivers/power/supply and the date on this manual is October 2026. Stay charged, stay iconic, and don't forget to check the other function pages in the SEE ALSO listโthey're all part of the same battery management story. Mwah! ๐๐โจ
๐ฆ 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