From mboxrd@z Thu Jan 1 00:00:00 1970 From: Przemyslaw Marczak Date: Tue, 14 Jan 2014 08:48:19 +0100 Subject: [U-Boot] [PATCH v2] fuelgauge: max17042: fix i2c read issue which causes infinity loop. In-Reply-To: <52D483C0.2020708@samsung.com> References: <1386688742-17901-1-git-send-email-p.marczak@samsung.com> <1388399072-10765-1-git-send-email-p.marczak@samsung.com> <52C14B83.7030105@samsung.com> <52D3B195.7000504@samsung.com> <52D483C0.2020708@samsung.com> Message-ID: <52D4EBC3.4020204@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, On 01/14/2014 01:24 AM, Minkyu Kang wrote: > On 13/01/14 18:27, Przemyslaw Marczak wrote: >> Hello Minkyu, >> >> On 12/30/2013 11:31 AM, Przemyslaw Marczak wrote: >>> Hello, >>> >>> On 12/30/2013 11:24 AM, 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 >>>> >>>> --- >>>> Changes v2: >>>> - add checking return value to functions fg read/write >>>> - add model lock and model check count >>>> - add status msg >>>> - change logical AND to bitwise AND when checking status register >>>> >>> >>> To test this patch, it is required to apply trats i2c fix by Piotr Wilczek: >>> "[PATCH] board:trats1:trats2: fix adapter number" >>> which can be found at u-boot list. >>> In other way FG will be not initialized. >>> >>> Regards, >> >> Could you review this patch, please? >> Is it possible to apply this before the release? >> It is useful fix. >> >> Thank you, > > This patch was delegated to Tom. > > Thanks, > Minkyu Kang. > Ok, thank you, -- Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com