Commit 0326f9f8 authored by Phil Reid's avatar Phil Reid Committed by Wolfram Sang

i2c: designware: rename i2c_dw_plat_prepare_clk to i2c_dw_prepare_clk

For consistency with the rest of the file rename function and parameter to
be consistent with the reset of the common file.
Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarPhil Reid <preid@electromag.com.au>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent a34a0b6d
...@@ -186,15 +186,15 @@ unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev) ...@@ -186,15 +186,15 @@ unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev)
return dev->get_clk_rate_khz(dev); return dev->get_clk_rate_khz(dev);
} }
int i2c_dw_plat_prepare_clk(struct dw_i2c_dev *i_dev, bool prepare) int i2c_dw_prepare_clk(struct dw_i2c_dev *dev, bool prepare)
{ {
if (IS_ERR(i_dev->clk)) if (IS_ERR(dev->clk))
return PTR_ERR(i_dev->clk); return PTR_ERR(dev->clk);
if (prepare) if (prepare)
return clk_prepare_enable(i_dev->clk); return clk_prepare_enable(dev->clk);
clk_disable_unprepare(i_dev->clk); clk_disable_unprepare(dev->clk);
return 0; return 0;
} }
......
...@@ -301,7 +301,7 @@ u32 i2c_dw_scl_lcnt(u32 ic_clk, u32 tLOW, u32 tf, int offset); ...@@ -301,7 +301,7 @@ u32 i2c_dw_scl_lcnt(u32 ic_clk, u32 tLOW, u32 tf, int offset);
void __i2c_dw_enable(struct dw_i2c_dev *dev, bool enable); void __i2c_dw_enable(struct dw_i2c_dev *dev, bool enable);
void __i2c_dw_enable_and_wait(struct dw_i2c_dev *dev, bool enable); void __i2c_dw_enable_and_wait(struct dw_i2c_dev *dev, bool enable);
unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev); unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev);
int i2c_dw_plat_prepare_clk(struct dw_i2c_dev *i_dev, bool prepare); int i2c_dw_prepare_clk(struct dw_i2c_dev *dev, bool prepare);
int i2c_dw_acquire_lock(struct dw_i2c_dev *dev); int i2c_dw_acquire_lock(struct dw_i2c_dev *dev);
void i2c_dw_release_lock(struct dw_i2c_dev *dev); void i2c_dw_release_lock(struct dw_i2c_dev *dev);
int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev); int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev);
......
...@@ -332,7 +332,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) ...@@ -332,7 +332,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
i2c_dw_configure_master(dev); i2c_dw_configure_master(dev);
dev->clk = devm_clk_get(&pdev->dev, NULL); dev->clk = devm_clk_get(&pdev->dev, NULL);
if (!i2c_dw_plat_prepare_clk(dev, true)) { if (!i2c_dw_prepare_clk(dev, true)) {
dev->get_clk_rate_khz = i2c_dw_get_clk_rate_khz; dev->get_clk_rate_khz = i2c_dw_get_clk_rate_khz;
if (!dev->sda_hold_time && ht) if (!dev->sda_hold_time && ht)
...@@ -436,7 +436,7 @@ static int dw_i2c_plat_suspend(struct device *dev) ...@@ -436,7 +436,7 @@ static int dw_i2c_plat_suspend(struct device *dev)
} }
i_dev->disable(i_dev); i_dev->disable(i_dev);
i2c_dw_plat_prepare_clk(i_dev, false); i2c_dw_prepare_clk(i_dev, false);
i_dev->suspended = true; i_dev->suspended = true;
...@@ -455,7 +455,7 @@ static int dw_i2c_plat_resume(struct device *dev) ...@@ -455,7 +455,7 @@ static int dw_i2c_plat_resume(struct device *dev)
return 0; return 0;
} }
i2c_dw_plat_prepare_clk(i_dev, true); i2c_dw_prepare_clk(i_dev, true);
i_dev->init(i_dev); i_dev->init(i_dev);
i_dev->suspended = false; i_dev->suspended = false;
......
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