max1720x_battery: prevent saving reset data into eeprom
We update eeprom cycle when read cycle register, but cycle register
reset to 0 when POR and we shouldn't update this data into eeprom.
However, there is a timing between read cycle register and check POR.
It is possible to read cycle earlier than detect POR and save 0 into
eeprom. Add check reset value and do not save into eeprom.
Bug: 213394909
Signed-off-by:
Jenny Ho <hsiufangho@google.com>
Change-Id: Idcd7cf4f4d83d73813524bb669db4d3992e2de8b
Loading
Please sign in to comment