projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d2b6a2
)
i2c: lpc32xx: fix write timeout
author
Sylvain Lemieux
<slemieux@tycoint.com>
Mon, 27 Jul 2015 17:37:39 +0000
(13:37 -0400)
committer
Tom Rini
<trini@konsulko.com>
Mon, 17 Aug 2015 12:11:50 +0000
(08:11 -0400)
Fix a condition that generate watchdog timeout inside "lpc32xx_i2c_write" when parameters alen = 0 and len = 0.
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
drivers/i2c/lpc32xx_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/lpc32xx_i2c.c
b/drivers/i2c/lpc32xx_i2c.c
index 4c66769103bf617d7e3201ffd7bf82ce9ed0512b..7f4eccdf537e35ff5c8ad1b8733c799b356e85c2 100644
(file)
--- a/
drivers/i2c/lpc32xx_i2c.c
+++ b/
drivers/i2c/lpc32xx_i2c.c
@@
-200,6
+200,8
@@
static int lpc32xx_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr,
if (alen | length)
/* Address slave in write mode */
writel((dev<<1) | LPC32XX_I2C_TX_START, &i2c->tx);
+ else
+ return 0;
/* write address bytes */
while (alen) {
/* wait for transmit fifo not full */