aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-tegra.c')
-rw-r--r--drivers/i2c/busses/i2c-tegra.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 55e5ea62ccee..18067b3ee8c9 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -476,12 +476,15 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev,
476 packet_header = msg->len - 1; 476 packet_header = msg->len - 1;
477 i2c_writel(i2c_dev, packet_header, I2C_TX_FIFO); 477 i2c_writel(i2c_dev, packet_header, I2C_TX_FIFO);
478 478
479 packet_header = msg->addr << I2C_HEADER_SLAVE_ADDR_SHIFT; 479 packet_header = I2C_HEADER_IE_ENABLE;
480 packet_header |= I2C_HEADER_IE_ENABLE;
481 if (!stop) 480 if (!stop)
482 packet_header |= I2C_HEADER_REPEAT_START; 481 packet_header |= I2C_HEADER_REPEAT_START;
483 if (msg->flags & I2C_M_TEN) 482 if (msg->flags & I2C_M_TEN) {
483 packet_header |= msg->addr;
484 packet_header |= I2C_HEADER_10BIT_ADDR; 484 packet_header |= I2C_HEADER_10BIT_ADDR;
485 } else {
486 packet_header |= msg->addr << I2C_HEADER_SLAVE_ADDR_SHIFT;
487 }
485 if (msg->flags & I2C_M_IGNORE_NAK) 488 if (msg->flags & I2C_M_IGNORE_NAK)
486 packet_header |= I2C_HEADER_CONT_ON_NAK; 489 packet_header |= I2C_HEADER_CONT_ON_NAK;
487 if (msg->flags & I2C_M_RD) 490 if (msg->flags & I2C_M_RD)
@@ -557,7 +560,7 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
557 560
558static u32 tegra_i2c_func(struct i2c_adapter *adap) 561static u32 tegra_i2c_func(struct i2c_adapter *adap)
559{ 562{
560 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 563 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
561} 564}
562 565
563static const struct i2c_algorithm tegra_i2c_algo = { 566static const struct i2c_algorithm tegra_i2c_algo = {