ab8500_char...nd_of_charge(9)
π ab8500_chargalg_end_of_charge β like, the kernel API manual, bestie β¨
Okay so real talk, this one's from the Kernel API Manual, and it's the lil function that does the vibes check on your battery to see if it's actually full or just pretending. π
πΈ NAME πΈ
ab8500_chargalg_end_of_charge β the function that checks whether the end-of-charge criteria is fulfilled. That's it, that's the whole job. She's focused. π
β¨ SYNOPSIS β¨
void ab8500_chargalg_end_of_charge (struct ab8500_chargalg *di );
Returns nothing (void, so no take-backs), and it takes exactly one thing. Low maintenance icon. π
π¦ ARGUMENTS π¦
diβ a pointer to theab8500_chargalgstructure. That's your whole charger-algorithm world right there, bestie, handed over by reference. π«Ά
π₯ DESCRIPTION π₯
So here's the tea β β the end-of-charge criteria is considered fulfilled when two things are happening at the same time:
- the battery voltage is above a certain limit, and
- the battery current is below a certain limit
β and both of those have to hold for a predefined number of consecutive seconds. Not one fluke second, not "it dipped below for a moment," like genuinely consecutively. The way it's giving patience and consistency honestly. π
If that's true? The battery is full. That's the whole plot. Battery = full, function = done, everyone goes home. β
π SEE ALSO π
Everything below lives in the kernel file ./drivers/power/supply/ab8500_chargalg.c, and honestly the whole friend group is here β go say hi to all of them π:
struct ab8500_charge_curr_maximization(9)struct ab8500_chargalg(9)ab8500_chargalg_safety_timer_expired(9)ab8500_chargalg_maintenance_timer_expired(9)ab8500_chargalg_state_to(9)ab8500_chargalg_check_charger_connection(9)ab8500_chargalg_start_safety_timer(9)ab8500_chargalg_stop_safety_timer(9)ab8500_chargalg_start_maintenance_timer(9)ab8500_chargalg_stop_maintenance_timer(9)ab8500_chargalg_kick_watchdog(9)ab8500_chargalg_ac_en(9)ab8500_chargalg_usb_en(9)ab8500_chargalg_update_chg_curr(9)ab8500_chargalg_stop_charging(9)ab8500_chargalg_hold_charging(9)ab8500_chargalg_start_charging(9)ab8500_chargalg_check_temp(9)ab8500_chargalg_check_charger_voltage(9)ab8500_chargalg_chg_curr_maxim(9)ab8500_chargalg_external_power_changed(9)ab8500_chargalg_time_to_restart(9)ab8500_chargalg_algorithm(9)ab8500_chargalg_periodic_work(9)ab8500_chargalg_wd_work(9)ab8500_chargalg_work(9)ab8500_chargalg_get_property(9)
Fr fr though, this page is from October 2026 out of./drivers/power/supply, and it's titledab8500_char...nd_of_charge(9)β yes the name is truncated, no she is not embarrassed about it, main character energy only. π§ββοΈ Go charge something, 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