Android 15 DP 2 Release 0.7 (AP31.240223.016.A3,shiba/husky)
max1720x_battery: fix cycle register overflow bug

- When cycle register overflow, cycle count offset wasn't assigned to
655 correctly. It caused fuel gauge report cycle count = 0.
- Assign value to chip->eeprom after validation.
- Fix next update cycle overflow and GMSR won't get update.
- Start updating cycles only after restore from EEPROM successfully.

Bug: 318106590
Test: When cycle register overflow, fuel gauge report 655 cycles
Change-Id: I38c92e8fff8f1ca5a160dd935026e63af384aae6
Signed-off-by: Spade Lee <spadelee@google.com>
1 file changed