]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Revert "I2C: Fix twl4030 timeouts on omap3430"
authorTony Lindgren <tony@atomide.com>
Mon, 31 Mar 2008 14:28:10 +0000 (17:28 +0300)
committerTony Lindgren <tony@atomide.com>
Mon, 31 Mar 2008 14:28:10 +0000 (17:28 +0300)
This reverts commit 621bce23f4c9684ba303a88d56b788350627621b.

This patch killed twl4030 interrupts.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/twl4030-core.c

index 86e0d5c266e96bc216ecef159056b89e99c94d0e..c979241f377702fb19accef6a018e15b5459d0d4 100644 (file)
@@ -327,7 +327,6 @@ int twl4030_i2c_read(u8 mod_no, u8 * value, u8 reg, u8 num_bytes)
                return -EPERM;
        }
        mutex_lock(&twl->xfer_lock);
-
        /* [MSG1] fill the register address data */
        msg = &twl->xfer_msg[0];
        msg->addr = twl->address;
@@ -335,31 +334,18 @@ int twl4030_i2c_read(u8 mod_no, u8 * value, u8 reg, u8 num_bytes)
        msg->flags = 0; /* Read the register value */
        val = twl4030_map[mod_no].base + reg;
        msg->buf = &val;
-
-       /*
-        * REVISIT: If we combine I2C write-read transfer, twl4030 can hang.
-        * The only difference is that I2C clocks are now cut inbetween write
-        * and read transfers.
-        */
-       ret = i2c_transfer(twl->client.adapter, twl->xfer_msg, 1);
-       if (ret < 0)
-               goto out;
-
        /* [MSG2] fill the data rx buffer */
        msg = &twl->xfer_msg[1];
        msg->addr = twl->address;
        msg->flags = I2C_M_RD;  /* Read the register value */
        msg->len = num_bytes;   /* only n bytes */
        msg->buf = value;
-       ret = i2c_transfer(twl->client.adapter, twl->xfer_msg, 1);
-
-out:
+       ret = i2c_transfer(twl->client.adapter, twl->xfer_msg, 2);
        mutex_unlock(&twl->xfer_lock);
 
        /* i2cTransfer returns num messages.translate it pls.. */
        if (ret >= 0)
                ret = 0;
-
        return ret;
 }