aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-tegra.c')
-rw-r--r--drivers/i2c/busses/i2c-tegra.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 8b2e555a956..3da7ee3eb50 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -341,7 +341,7 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
341 u32 val; 341 u32 val;
342 int err = 0; 342 int err = 0;
343 343
344 clk_enable(i2c_dev->clk); 344 clk_prepare_enable(i2c_dev->clk);
345 345
346 tegra_periph_reset_assert(i2c_dev->clk); 346 tegra_periph_reset_assert(i2c_dev->clk);
347 udelay(2); 347 udelay(2);
@@ -372,7 +372,7 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
372 if (tegra_i2c_flush_fifos(i2c_dev)) 372 if (tegra_i2c_flush_fifos(i2c_dev))
373 err = -ETIMEDOUT; 373 err = -ETIMEDOUT;
374 374
375 clk_disable(i2c_dev->clk); 375 clk_disable_unprepare(i2c_dev->clk);
376 376
377 if (i2c_dev->irq_disabled) { 377 if (i2c_dev->irq_disabled) {
378 i2c_dev->irq_disabled = 0; 378 i2c_dev->irq_disabled = 0;
@@ -546,14 +546,14 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
546 if (i2c_dev->is_suspended) 546 if (i2c_dev->is_suspended)
547 return -EBUSY; 547 return -EBUSY;
548 548
549 clk_enable(i2c_dev->clk); 549 clk_prepare_enable(i2c_dev->clk);
550 for (i = 0; i < num; i++) { 550 for (i = 0; i < num; i++) {
551 int stop = (i == (num - 1)) ? 1 : 0; 551 int stop = (i == (num - 1)) ? 1 : 0;
552 ret = tegra_i2c_xfer_msg(i2c_dev, &msgs[i], stop); 552 ret = tegra_i2c_xfer_msg(i2c_dev, &msgs[i], stop);
553 if (ret) 553 if (ret)
554 break; 554 break;
555 } 555 }
556 clk_disable(i2c_dev->clk); 556 clk_disable_unprepare(i2c_dev->clk);
557 return ret ?: i; 557 return ret ?: i;
558} 558}
559 559
@@ -666,7 +666,7 @@ static int __devinit tegra_i2c_probe(struct platform_device *pdev)
666 goto err_free; 666 goto err_free;
667 } 667 }
668 668
669 clk_enable(i2c_dev->i2c_clk); 669 clk_prepare_enable(i2c_dev->i2c_clk);
670 670
671 i2c_set_adapdata(&i2c_dev->adapter, i2c_dev); 671 i2c_set_adapdata(&i2c_dev->adapter, i2c_dev);
672 i2c_dev->adapter.owner = THIS_MODULE; 672 i2c_dev->adapter.owner = THIS_MODULE;