Some bq27xxx variants are unable to automatically determine the state of
the battery, e.g. capacity, after a reset. Under these conditions, they
will report incorrect zero values even when the battery is full. This is
misleading to userspace, and leads to premature shutdowns.
In an effort to fix this, a patch [0] was submitted, which unfortunately
introduced a regression [1]. This patch series resolves the regression
and implements the fix correctly.
[0]
https://lore.kernel.org/linux-pm/20250207220605.106768-1-absicsz@gmail.com/
[1]
https://lore.kernel.org/linux-pm/CB5B8FE7-D619-4D30-BD2D-58B6CEF83D46@goldelico.com/