cpcap_batter..._accumulated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🌈


πŸ¦‹ and that's a wrap, bestie! this page lives in ./drivers/power/supply, dated October 2026 β€” iconic, no notes πŸ’œπŸ‘‘βœ¨

πŸ“¦ where this page comes from