]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 00:11:02 +0000 (10:11 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 00:11:02 +0000 (10:11 +1000)
Conflicts:
drivers/i2c/busses/i2c-nomadik.c

1  2 
arch/arm/boot/dts/imx28.dtsi
arch/arm/mach-ux500/board-mop500.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-imx.c
drivers/i2c/busses/i2c-nomadik.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-tegra.c

Simple merge
Simple merge
Simple merge
Simple merge
index a92440dbef078ba18c6c5561a74f7f8265ba72c4,e6b93f3ca8676bb6a37b8577277b5ac284c8d4ad..5e6f1eed4f83f233da76202c70d7564f773d3e1c
@@@ -965,12 -969,12 +969,11 @@@ static int nmk_i2c_probe(struct amba_de
        adap->owner     = THIS_MODULE;
        adap->class     = I2C_CLASS_HWMON | I2C_CLASS_SPD;
        adap->algo      = &nmk_i2c_algo;
 -      adap->timeout   = pdata->timeout ? msecs_to_jiffies(pdata->timeout) :
 -              msecs_to_jiffies(20000);
 +      adap->timeout   = msecs_to_jiffies(pdata->timeout);
+       adap->nr = atomic_read(&adapter_id);
        snprintf(adap->name, sizeof(adap->name),
-                "Nomadik I2C%d at %lx", pdev->id, (unsigned long)res->start);
-       /* fetch the controller id */
-       adap->nr        = pdev->id;
+                "Nomadik I2C%d at %pR", adap->nr, &adev->res);
+       atomic_inc(&adapter_id);
  
        /* fetch the controller configuration from machine */
        dev->cfg.clk_freq = pdata->clk_freq;
Simple merge
index 3da7ee3eb505e0816d809093958f0259816c3450,f85dee549e21c45b79e43276fc2aff4c92118f33..66eb53fac2022363c3cf90fa96d0ad6358234acc
@@@ -546,10 -563,16 +563,16 @@@ static int tegra_i2c_xfer(struct i2c_ad
        if (i2c_dev->is_suspended)
                return -EBUSY;
  
 -      clk_enable(i2c_dev->clk);
 +      clk_prepare_enable(i2c_dev->clk);
        for (i = 0; i < num; i++) {
-               int stop = (i == (num - 1)) ? 1  : 0;
-               ret = tegra_i2c_xfer_msg(i2c_dev, &msgs[i], stop);
+               enum msg_end_type end_type = MSG_END_STOP;
+               if (i < (num - 1)) {
+                       if (msgs[i + 1].flags & I2C_M_NOSTART)
+                               end_type = MSG_END_CONTINUE;
+                       else
+                               end_type = MSG_END_REPEAT_START;
+               }
+               ret = tegra_i2c_xfer_msg(i2c_dev, &msgs[i], end_type);
                if (ret)
                        break;
        }
@@@ -657,16 -671,17 +671,17 @@@ static int __devinit tegra_i2c_probe(st
        ret = tegra_i2c_init(i2c_dev);
        if (ret) {
                dev_err(&pdev->dev, "Failed to initialize i2c controller");
-               goto err_free;
+               return ret;
        }
  
-       ret = request_irq(i2c_dev->irq, tegra_i2c_isr, 0, pdev->name, i2c_dev);
+       ret = devm_request_irq(&pdev->dev, i2c_dev->irq,
+                       tegra_i2c_isr, 0, pdev->name, i2c_dev);
        if (ret) {
                dev_err(&pdev->dev, "Failed to request irq %i\n", i2c_dev->irq);
-               goto err_free;
+               return ret;
        }
  
 -      clk_enable(i2c_dev->i2c_clk);
 +      clk_prepare_enable(i2c_dev->i2c_clk);
  
        i2c_set_adapdata(&i2c_dev->adapter, i2c_dev);
        i2c_dev->adapter.owner = THIS_MODULE;