[U-Boot] [U-Boot, v2] fuelgauge: max17042: fix i2c read issue which causes infinity loop.

Tom Rini trini at ti.com
Tue Jan 14 22:02:23 CET 2014


On Mon, Dec 30, 2013 at 11:24:32AM +0100, Przemyslaw Marczak wrote:

> 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: Przemyslaw Marczak <p.marczak at samsung.com>
> Cc: Lukasz Majewski <l.majewski at samsung.com>
> Cc: Minkyu Kang <mk7.kang at samsung.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140114/bd69db8d/attachment.pgp>


More information about the U-Boot mailing list