Commit 21bf440c authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Wolfram Sang

i2c: designware: Make HW init functions static

Recent i2c-designware slave support patches use master or slave HW init
functions through the function pointer so we can declare them static.

While at it, rename i2c_dw_init() as i2c_dw_init_master().
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarLuis Oliveira <lolivei@synopsys.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 9809cb83
...@@ -306,8 +306,6 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev); ...@@ -306,8 +306,6 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev);
u32 i2c_dw_func(struct i2c_adapter *adap); u32 i2c_dw_func(struct i2c_adapter *adap);
void i2c_dw_disable(struct dw_i2c_dev *dev); void i2c_dw_disable(struct dw_i2c_dev *dev);
void i2c_dw_disable_int(struct dw_i2c_dev *dev); void i2c_dw_disable_int(struct dw_i2c_dev *dev);
int i2c_dw_init(struct dw_i2c_dev *dev);
int i2c_dw_init_slave(struct dw_i2c_dev *dev);
extern u32 i2c_dw_read_comp_param(struct dw_i2c_dev *dev); extern u32 i2c_dw_read_comp_param(struct dw_i2c_dev *dev);
extern int i2c_dw_probe(struct dw_i2c_dev *dev); extern int i2c_dw_probe(struct dw_i2c_dev *dev);
......
...@@ -51,7 +51,7 @@ static void i2c_dw_configure_fifo_master(struct dw_i2c_dev *dev) ...@@ -51,7 +51,7 @@ static void i2c_dw_configure_fifo_master(struct dw_i2c_dev *dev)
* This function is called during I2C init function, and in case of timeout at * This function is called during I2C init function, and in case of timeout at
* run time. * run time.
*/ */
int i2c_dw_init(struct dw_i2c_dev *dev) static int i2c_dw_init_master(struct dw_i2c_dev *dev)
{ {
u32 hcnt, lcnt; u32 hcnt, lcnt;
u32 reg, comp_param1; u32 reg, comp_param1;
...@@ -171,7 +171,6 @@ int i2c_dw_init(struct dw_i2c_dev *dev) ...@@ -171,7 +171,6 @@ int i2c_dw_init(struct dw_i2c_dev *dev)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(i2c_dw_init);
static void i2c_dw_xfer_init(struct dw_i2c_dev *dev) static void i2c_dw_xfer_init(struct dw_i2c_dev *dev)
{ {
...@@ -444,7 +443,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) ...@@ -444,7 +443,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
if (!wait_for_completion_timeout(&dev->cmd_complete, adap->timeout)) { if (!wait_for_completion_timeout(&dev->cmd_complete, adap->timeout)) {
dev_err(dev->dev, "controller timed out\n"); dev_err(dev->dev, "controller timed out\n");
/* i2c_dw_init implicitly disables the adapter */ /* i2c_dw_init implicitly disables the adapter */
i2c_dw_init(dev); i2c_dw_init_master(dev);
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
goto done; goto done;
} }
...@@ -622,7 +621,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) ...@@ -622,7 +621,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev)
init_completion(&dev->cmd_complete); init_completion(&dev->cmd_complete);
dev->init = i2c_dw_init; dev->init = i2c_dw_init_master;
dev->disable = i2c_dw_disable; dev->disable = i2c_dw_disable;
dev->disable_int = i2c_dw_disable_int; dev->disable_int = i2c_dw_disable_int;
......
...@@ -49,7 +49,7 @@ static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev) ...@@ -49,7 +49,7 @@ static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev)
* This function is called during I2C init function, and in case of timeout at * This function is called during I2C init function, and in case of timeout at
* run time. * run time.
*/ */
int i2c_dw_init_slave(struct dw_i2c_dev *dev) static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
{ {
u32 sda_falling_time, scl_falling_time; u32 sda_falling_time, scl_falling_time;
u32 reg, comp_param1; u32 reg, comp_param1;
...@@ -168,7 +168,6 @@ int i2c_dw_init_slave(struct dw_i2c_dev *dev) ...@@ -168,7 +168,6 @@ int i2c_dw_init_slave(struct dw_i2c_dev *dev)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(i2c_dw_init_slave);
static int i2c_dw_reg_slave(struct i2c_client *slave) static int i2c_dw_reg_slave(struct i2c_client *slave)
{ {
......
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