Fuel gauge
The chip that tries to answer the deceptively simple question of how much is left in the battery.
Voltage alone is a poor guide. A lithium-ion cell sits on a flat plateau between roughly 3.6 and 3.9 volts for most of its discharge, and the voltage sags under load on top of that. Coulomb counting instead measures current through a small shunt resistor and integrates it: accurate in the short term, but it drifts and has to be recalibrated whenever the cell reaches full or empty. Commercial parts combine the two. TI's Impedance Track models the cell's internal resistance; Maxim's ModelGauge does without a shunt altogether.
Firmware reads the result over I²C or SMBus. The phone that sits at 1% for half an hour, or dies at 20%, is a gauge that has not yet learned its battery.