From: Wolfgang Denk Date: Tue, 27 Jan 2009 22:26:44 +0100 Subject: [U-Boot] [PATCH] soft_i2c.c add option for repeated start in i2c_read() In-Reply-To: <49595EE1.8040001@righthandtech.com> References: <49595EE1.8040001@righthandtech.com> Message-ID: <20090127212644.78769832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Andrew Dyer, In message <49595EE1.8040001@righthandtech.com> you wrote: > > This patch adds a #define to optionally change the behaviour of > i2c_read() in soft_i2c.c to send an I2C repeated start instead of a > stop-start between sending the device address pointer write and > reading back the data. The current behaviour is retained as the > default. > > While most devices will work either way, I have a smart battery(*) that > requires repeated start, and someone at some point found a device that > required a stop-start. > > (*) http://www.inspired-energy.com/Standard_Products/NL2054/NL2054%20Rev1.0%20Data%20Sheet.pdf > > Signed-off-by: Andrew Dyer > --- > README | 9 +++++++++ > drivers/i2c/soft_i2c.c | 12 +++++++++++- > 2 files changed, 20 insertions(+), 1 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A wise person makes his own decisions, a weak one obeys public opinion. -- Chinese proverb