cpcap_batter..._accumulated(9)
β¨ NAME β¨
okay so bestie, this is cpcap_batter..._accumulated(9) from the Kernel API Manual, and it's literally just one function: cpcap_battery_read_accumulated β it reads the cpcap coulomb counter π
that's the whole vibe, no cap.
π¦ SYNOPSIS π¦
int cpcap_battery_read_accumulated (struct cpcap_battery_ddata *ddata ,
struct cpcap_coulomb_counter_data *ccd );
like, that's the whole call, periodt β¨
π ARGUMENTS π
ddataβ the device driver data πΈ honestly the main character struct here.ccdβ the coulomb counter values π«Ά that's where the numbers land.
π DESCRIPTION π
so this whole thing is based on the Motorola mapphone kernel function data_read_regs. π₯ and like, if you actually look at the registers? the coulomb counter is lowkey similar to the coulomb counter in TWL6030. highkey the same energy, iykyk. π
if you wanna go deeper, check "TWL6030 Gas Gauging Basics (Rev. A) swca095a.pdf for "10 Calculating Accumulated Current" β that's the chapter you want, bestie πβ¨
okay so important caveat time π swca095a.pdf literally instructs you to stop the coulomb counter before reading so the values don't change mid-read. but the Motorola mapphone Linux kernel does not do that π so let's just assume they've already verified the data produced is correct. that's the assumption we're rolling with, ngl.
π SEE ALSO π
- Kernel file
./drivers/power/supply/cpcap-battery.cπ cpcap_battery_cc_raw_div(9)β yes bestie, go read itcpcap_battery_cc_get_avg_current(9)β and this one too π§
π¦ and that's a wrap, bestie! this page lives in ./drivers/power/supply, dated October 2026 β iconic, no notes ππβ¨
π¦ 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