Skip to content

Commit

Permalink
Merge branch 'for-linus/i2c/2636-rc5' of git://git.fluff.org/bjdooks/…
Browse files Browse the repository at this point in the history
…linux

* 'for-linus/i2c/2636-rc5' of git://git.fluff.org/bjdooks/linux:
  i2c-s3c2410: fix calculation of SDA line delay
  i2c-davinci: Fix race when setting up for TX
  i2c-octeon: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
  • Loading branch information
Linus Torvalds committed Oct 1, 2010
2 parents 303a407 + 7031307 commit b10c4d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/i2c/busses/i2c-davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,6 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)

dev->terminate = 0;

/* write the data into mode register */
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag);

/*
* First byte should be set here, not after interrupt,
* because transmit-data-ready interrupt can come before
Expand All @@ -371,6 +368,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
dev->buf_len--;
}

/* write the data into mode register; start transmitting */
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag);

r = wait_for_completion_interruptible_timeout(&dev->cmd_complete,
dev->adapter.timeout);
if (r == 0) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
return result;
} else if (result == 0) {
dev_dbg(i2c->dev, "%s: timeout\n", __func__);
result = -ETIMEDOUT;
return -ETIMEDOUT;
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)
unsigned long sda_delay;

if (pdata->sda_delay) {
sda_delay = (freq / 1000) * pdata->sda_delay;
sda_delay /= 1000000;
sda_delay = clkin * pdata->sda_delay;
sda_delay = DIV_ROUND_UP(sda_delay, 1000000);
sda_delay = DIV_ROUND_UP(sda_delay, 5);
if (sda_delay > 3)
sda_delay = 3;
Expand Down

0 comments on commit b10c4d4

Please sign in to comment.