i.MX28 Linux BSP I2C source codes bug

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX28 Linux BSP I2C source codes bug

3,776 次查看
jackyliu
NXP Employee
NXP Employee

in drivers/i2c/busses/i2c-mxs.c, mxs_i2c_xfer_msg() function:
below codes are not correct:
 err = wait_for_completion_interruptible_timeout(&dev->cmd_complete,
       msecs_to_jiffies(1000)
     );
 if (err <= 0) {
  mxs_i2c_reset(dev);
  dev_dbg(dev->dev, "controller is timed out\n");
  return -ETIMEDOUT;
 }

标签 (1)
0 项奖励
回复
5 回复数

2,414 次查看
jackyliu
NXP Employee
NXP Employee

It should be changed as belows:
err = wait_for_completion_interruptible_timeout(&dev->cmd_complete, msecs_to_jiffies(1000));
      if (err == 0) {
              mxs_i2c_reset(dev);
              printk("I2C timeout\n");
              return -ETIMEDOUT;
      }
      else if (err==(-ERESTARTSYS)) {
              printk("I2C ERESTARTSYS\n");
          for (i = 0; i < _NSIG_WORDS ; i++) printk("I2C signal:%d\n",current->pending.signal.sig[i]);              
              return -ETIMEDOUT;
      }
      else if (err<0){
              printk("I2C unknown err:%d\n",err);
              return -ETIMEDOUT;
      }

0 项奖励
回复

2,414 次查看
samuelsalas
Contributor III

Hi Jacky,

Have you got a last version of "i2c-mxs.c" I could use to solve my two issues :

I2C frequency on 2 buses

Conflict on 2 I2C buses

Regards,

Sam.

0 项奖励
回复

2,414 次查看
ArtyomKamshilin
Contributor II

Sam,

> Have you got a last version of "i2c-mxs.c"

I also have issues with I2C - where can I get this latest version? I've got all patches applied. Thanks in advance!

Arty

0 项奖励
回复

2,414 次查看
samuelsalas
Contributor III

Hi Artem,

there is no last version of "i2c-mxs.c" for the kernel 2.6.35, but there is a new version with kernel 3.7. That's what we are doing now, passing to 3.7 in order to benefit from the new kernel.

Samuel

0 项奖励
回复

2,414 次查看
ArtyomKamshilin
Contributor II

Thanks, I look forward for the update!

0 项奖励
回复