Commit e34d6b4b authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus/i2c-32-rc6' of git://git.fluff.org/bjdooks/linux

* 'for-linus/i2c-32-rc6' of git://git.fluff.org/bjdooks/linux:
  i2c-eg20t: correct the driver init order of pch_i2c_probe()
  I2C: OMAP: fix FIFO usage for OMAP4
  i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
  i2c: i2c-s3c2410: Add a cpu_relax() to busy wait for bus idle
parents 497f16f2 0d5fb5ea
...@@ -893,6 +893,13 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev, ...@@ -893,6 +893,13 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev,
/* Set the number of I2C channel instance */ /* Set the number of I2C channel instance */
adap_info->ch_num = id->driver_data; adap_info->ch_num = id->driver_data;
ret = request_irq(pdev->irq, pch_i2c_handler, IRQF_SHARED,
KBUILD_MODNAME, adap_info);
if (ret) {
pch_pci_err(pdev, "request_irq FAILED\n");
goto err_request_irq;
}
for (i = 0; i < adap_info->ch_num; i++) { for (i = 0; i < adap_info->ch_num; i++) {
pch_adap = &adap_info->pch_data[i].pch_adapter; pch_adap = &adap_info->pch_data[i].pch_adapter;
adap_info->pch_i2c_suspended = false; adap_info->pch_i2c_suspended = false;
...@@ -910,28 +917,23 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev, ...@@ -910,28 +917,23 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev,
pch_adap->dev.parent = &pdev->dev; pch_adap->dev.parent = &pdev->dev;
pch_i2c_init(&adap_info->pch_data[i]);
ret = i2c_add_adapter(pch_adap); ret = i2c_add_adapter(pch_adap);
if (ret) { if (ret) {
pch_pci_err(pdev, "i2c_add_adapter[ch:%d] FAILED\n", i); pch_pci_err(pdev, "i2c_add_adapter[ch:%d] FAILED\n", i);
goto err_i2c_add_adapter; goto err_add_adapter;
} }
pch_i2c_init(&adap_info->pch_data[i]);
}
ret = request_irq(pdev->irq, pch_i2c_handler, IRQF_SHARED,
KBUILD_MODNAME, adap_info);
if (ret) {
pch_pci_err(pdev, "request_irq FAILED\n");
goto err_i2c_add_adapter;
} }
pci_set_drvdata(pdev, adap_info); pci_set_drvdata(pdev, adap_info);
pch_pci_dbg(pdev, "returns %d.\n", ret); pch_pci_dbg(pdev, "returns %d.\n", ret);
return 0; return 0;
err_i2c_add_adapter: err_add_adapter:
for (j = 0; j < i; j++) for (j = 0; j < i; j++)
i2c_del_adapter(&adap_info->pch_data[j].pch_adapter); i2c_del_adapter(&adap_info->pch_data[j].pch_adapter);
free_irq(pdev->irq, adap_info);
err_request_irq:
pci_iounmap(pdev, base_addr); pci_iounmap(pdev, base_addr);
err_pci_iomap: err_pci_iomap:
pci_release_regions(pdev); pci_release_regions(pdev);
......
...@@ -1047,13 +1047,14 @@ omap_i2c_probe(struct platform_device *pdev) ...@@ -1047,13 +1047,14 @@ omap_i2c_probe(struct platform_device *pdev)
* size. This is to ensure that we can handle the status on int * size. This is to ensure that we can handle the status on int
* call back latencies. * call back latencies.
*/ */
if (dev->rev >= OMAP_I2C_REV_ON_3530_4430) {
dev->fifo_size = 0;
dev->b_hw = 0; /* Disable hardware fixes */
} else {
dev->fifo_size = (dev->fifo_size / 2); dev->fifo_size = (dev->fifo_size / 2);
if (dev->rev >= OMAP_I2C_REV_ON_3530_4430)
dev->b_hw = 0; /* Disable hardware fixes */
else
dev->b_hw = 1; /* Enable hardware fixes */ dev->b_hw = 1; /* Enable hardware fixes */
}
/* calculate wakeup latency constraint for MPU */ /* calculate wakeup latency constraint for MPU */
if (dev->set_mpu_wkup_lat != NULL) if (dev->set_mpu_wkup_lat != NULL)
dev->latency = (1000000 * dev->fifo_size) / dev->latency = (1000000 * dev->fifo_size) /
......
...@@ -534,6 +534,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, ...@@ -534,6 +534,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
/* first, try busy waiting briefly */ /* first, try busy waiting briefly */
do { do {
cpu_relax();
iicstat = readl(i2c->regs + S3C2410_IICSTAT); iicstat = readl(i2c->regs + S3C2410_IICSTAT);
} while ((iicstat & S3C2410_IICSTAT_START) && --spins); } while ((iicstat & S3C2410_IICSTAT_START) && --spins);
...@@ -786,7 +787,7 @@ static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c) ...@@ -786,7 +787,7 @@ static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
#else #else
static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c) static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
{ {
return -EINVAL; return 0;
} }
static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c) static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment