Skip to content
Snippets Groups Projects
Commit c9b0fa31 authored by Przemyslaw Marczak's avatar Przemyslaw Marczak Committed by Tom Rini
Browse files

fuelgauge: max17042: fix i2c read issue which causes infinity loop.


Issues:
- reading i2c data by passing u16 pointer causes errors in read data.
- max17042 status register fields have not only Power On Reset meaning
  so using proper mask is required.

Changes:
- read i2c data to type u32 instead of u16 - avoids buffer overflow
- compare FG status register using mask not just one bit value
- add checking return value to functions fg read/write
- add model lock and model check count
- add debug msg

Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
parent 68b15e83
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment