From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 14 Jan 2014 16:02:23 -0500 Subject: [U-Boot] [U-Boot, v2] fuelgauge: max17042: fix i2c read issue which causes infinity loop. In-Reply-To: <1388399072-10765-1-git-send-email-p.marczak@samsung.com> References: <1388399072-10765-1-git-send-email-p.marczak@samsung.com> Message-ID: <20140114210223.GS5181@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Lukasz Majewski > Cc: Minkyu Kang 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: