max1720x_battery: use single mutex lock for protection

- add chip->history_ok to avoid multiple execution
- use single lock(chip->model_lock) for protection.
- fix history update condition when cycle count is fixed.

Bug: 322426625
Test: max1720x_check_history() only run once.
      history can be updated after cycle count fix from 770 to 210
Merged-In: I84e3e1d5dce52b848efc37c496ba49a411380623
Change-Id: I9c8a0568722eccea42ac28037c8c9054682e886b
Signed-off-by: Spade Lee <[email protected]>
2 files changed