i2c: tegra: remove support for I2C_M_REV_DIR_ADDR
Laxman Dewangan [Wed, 29 Aug 2012 09:41:59 +0000 (14:41 +0530)]
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 <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/128149

drivers/i2c/busses/i2c-tegra.c

index 2c79559..6c8b562 100644 (file)
@@ -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",