summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2010-10-18 15:20:42 -0700
committerErik Gilling <konkers@android.com>2010-10-18 15:23:35 -0700
commitbf82ae424d7f77a4a878a9932841e10433d850b4 (patch)
tree2ac09b3e96d0b6e9758152a87ead53665d6eb0ef /drivers/i2c
parent943300a8d57ff28780d45401dc50fbc0792921a8 (diff)
i2c: tegra: fix repeated start handling
A repeated start should be used for all but the last msg in an xfer. The NOSTART flag is for skipping the START frame (addr/rw) Change-Id: If4bc88478521a8c4e1ec761bd42a84d3e398fa26 Signed-off-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-tegra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index cf6df1f4bdaf..7e201501a84c 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -433,12 +433,12 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_bus *i2c_bus,
packet_header = msg->addr << I2C_HEADER_SLAVE_ADDR_SHIFT;
packet_header |= I2C_HEADER_IE_ENABLE;
+ if (!stop)
+ packet_header |= I2C_HEADER_REPEAT_START;
if (msg->flags & I2C_M_TEN)
packet_header |= I2C_HEADER_10BIT_ADDR;
if (msg->flags & I2C_M_IGNORE_NAK)
packet_header |= I2C_HEADER_CONT_ON_NAK;
- if (msg->flags & I2C_M_NOSTART)
- packet_header |= I2C_HEADER_REPEAT_START;
if (msg->flags & I2C_M_RD)
packet_header |= I2C_HEADER_READ;
i2c_writel(i2c_dev, packet_header, I2C_TX_FIFO);