On Tue, Jul 17, 2012 at 3:01 PM, Yegor Yefremov
<[email protected]> wrote:
> On Thu, Jul 12, 2012 at 7:24 AM, Datta, Shubhrajyoti
> <[email protected]> wrote:
[...]
>> On Wed, Jul 11, 2012 at 10:22 PM, Shubhrajyoti <[email protected]> wrote:


>
> Thank you for the patch and sorry for delay. I tried the patch,

Thanks for the test.

> but it doesn't help. I still get timeouts only. I fear it is really a
> hardware feature,

I feel that could be unlikely.

> that OMAPs i2c stops if address is not acknowledged.
> At least this is my understanding of the reference manual.
>
> Here is the output from dmesg:


Another request. Can you disable the NACK interrupt on the ignore and
enable back?

Also let me know if you know of any of the panda or sdp peripherals
which could keep going on
NACK.

patch below.

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..82e52a5 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -523,6 +523,11 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
        if (msg->len == 0)
                return -EINVAL;

+       if (msg->flags == I2C_M_IGNORE_NAK) {
+               dev->iestate = dev->iestate &  ~OMAP_I2C_IE_NACK ;
+               omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
+       }
+
        omap_i2c_write_reg(dev, OMAP_I2C_SA_REG, msg->addr);

        /* REVISIT: Could the STB bit of I2C_CON be used with probing? */
@@ -584,6 +589,10 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
         */
        r = wait_for_completion_timeout(&dev->cmd_complete,
                                        OMAP_I2C_TIMEOUT);
+       if (msg->flags == I2C_M_IGNORE_NAK) {
+               dev->iestate = dev->iestate | OMAP_I2C_IE_NACK ;
+               omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
+       }
        dev->buf_len = 0;
        if (r < 0)
                return r;
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to