ab8500_fg_u..._to_capacity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ab8500_fg_uncomp_volt_to_capacity(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's a little function from the kernel's power supply corner and she's honestly doing the most important job: telling you how much battery you have left, purely from voltage, no load-compensation drama. let's get into it 🫢


🌸 NAME 🌸

ab8500_fg_uncomp_volt_to_capacity β€” the uncompensated-voltage-based capacity girlie πŸ”‹βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

int ab8500_fg_uncomp_volt_to_capacity (struct ab8500_fg *di );

like, that's the whole signature. one argument, one int back. slay πŸ’…


πŸ’œ ARGUMENTS πŸ’œ

  • di β€” pointer to the ab8500_fg structure. literally just the fuel gauge's whole personality in one struct, iykyk.

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually do? she returns battery capacity based on battery voltage β€” but here's the tea: that voltage is not compensated for the voltage drop due to the load. no cap. πŸ«–

so like, the load is out here dragging the voltage down and this function is just reading the raw voltage and giving you a capacity anyway. it's the "no thoughts, head empty" version of capacity calculation and honestly? iconic. 🌈


πŸ”₯ SEE ALSO πŸ”₯

all the other ab8500_fg besties (the whole group chat, fr fr) live in the kernel file ./drivers/power/supply/ab8500_fg.c πŸ‘‘

that's the whole roster, no skips, we don't do that here πŸ’–


πŸ‘‘ the cute sign-off πŸ‘‘

this little beauty comes from ./drivers/power/supply, dated October 2026 β€” so yeah, she's from the future bestie, we don't question it πŸ§šβ€β™€οΈβœ¨ go read your battery voltage, stay uncompensated, and remember: the load is lying to you πŸ’€πŸ’…

πŸ“¦ where this page comes from