[U-Boot] [PATCH] soft_i2c.c add option for repeated start in i2c_read()

Wolfgang Denk wd at denx.de
Tue Jan 27 22:26:44 CET 2009


Dear Andrew Dyer,

In message <49595EE1.8040001 at 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 <adyer at righthandtech.com>
> ---
>  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


More information about the U-Boot mailing list