diff options
author | Phil Reid <preid@electromag.com.au> | 2017-11-02 05:40:25 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-11-27 20:39:22 +0300 |
commit | a34a0b6da22540d19e578131bbb60994892473d3 (patch) | |
tree | 068d5c5fb1edf42aa33a1f4cd2402682a8dc7ee5 /drivers/i2c/busses/i2c-designware-platdrv.c | |
parent | 3991c5c80beaf7eb9bce61e0b2f8f449e351a38e (diff) | |
download | linux-a34a0b6da22540d19e578131bbb60994892473d3.tar.xz |
i2c: designware: move i2c_dw_plat_prepare_clk to common
Move the i2c_dw_plat_prepare_clk funciton to common file in preparation
for its use also by the master driver.
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-platdrv.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 293f586d78d2..6a3fd8d7c273 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -203,18 +203,6 @@ static void i2c_dw_configure_slave(struct dw_i2c_dev *dev) dev->mode = DW_IC_SLAVE; } -static int i2c_dw_plat_prepare_clk(struct dw_i2c_dev *i_dev, bool prepare) -{ - if (IS_ERR(i_dev->clk)) - return PTR_ERR(i_dev->clk); - - if (prepare) - return clk_prepare_enable(i_dev->clk); - - clk_disable_unprepare(i_dev->clk); - return 0; -} - static void dw_i2c_set_fifo_size(struct dw_i2c_dev *dev, int id) { u32 param, tx_fifo_depth, rx_fifo_depth; |