From 745ab307fb167c9baf4d671f3fa5836319d9469d Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 29 Aug 2012 15:11:59 +0530 Subject: i2c: tegra: remove support for I2C_M_REV_DIR_ADDR The Tegra i2c controller actually can not support the reverse of direction address (toggling r/w bit of address) as controller take 7 bit address from configuration and HW make it 8 bit address based on read/write flag. Hence reverting this protocol mangling support. Change-Id: I987b2be343d535c078e27b44575717a209d15584 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/128149 --- drivers/i2c/busses/i2c-tegra.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 2c795592f80e..6c8b56221324 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -664,10 +664,6 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_bus *i2c_bus, tegra_i2c_flush_fifos(i2c_dev); - /* Toggle the direction flag if rev dir is selected */ - if (msg->flags & I2C_M_REV_DIR_ADDR) - msg->flags ^= I2C_M_RD; - i2c_dev->msg_buf = msg->buf; i2c_dev->msg_buf_remaining = msg->len; i2c_dev->msg_err = I2C_ERR_NONE; @@ -728,10 +724,6 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_bus *i2c_bus, if (i2c_dev->is_dvc) dvc_i2c_mask_irq(i2c_dev, DVC_CTRL_REG3_I2C_DONE_INTR_EN); - /* Restore the message flag */ - if (msg->flags & I2C_M_REV_DIR_ADDR) - msg->flags ^= I2C_M_RD; - if (WARN_ON(ret == 0)) { dev_err(i2c_dev->dev, "i2c transfer timed out, addr 0x%04x, data 0x%02x\n", -- cgit v1.2.3