aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-03-29 06:23:41 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-03-29 07:09:44 -0400
commitadf68acf387a203d76315d72b36b829bde1d01b6 (patch)
tree73130482b314fc9e92552eeb341b26742b01e618 /drivers/i2c
parent7fafae669a623b003d9d40b75ab31bb9625d5c38 (diff)
i2c: davinci: rename recover bus functions
Since we have generic i2c bus recover routines now, these custom ones need to be renamed to fix the namespace clash. Proper conversion needs to be done by someone who has access to the hardware. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-davinci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 7d1e590a7bb6..61f793b8789e 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -137,7 +137,7 @@ static inline u16 davinci_i2c_read_reg(struct davinci_i2c_dev *i2c_dev, int reg)
137} 137}
138 138
139/* Generate a pulse on the i2c clock pin. */ 139/* Generate a pulse on the i2c clock pin. */
140static void generic_i2c_clock_pulse(unsigned int scl_pin) 140static void davinci_i2c_clock_pulse(unsigned int scl_pin)
141{ 141{
142 u16 i; 142 u16 i;
143 143
@@ -155,7 +155,7 @@ static void generic_i2c_clock_pulse(unsigned int scl_pin)
155/* This routine does i2c bus recovery as specified in the 155/* This routine does i2c bus recovery as specified in the
156 * i2c protocol Rev. 03 section 3.16 titled "Bus clear" 156 * i2c protocol Rev. 03 section 3.16 titled "Bus clear"
157 */ 157 */
158static void i2c_recover_bus(struct davinci_i2c_dev *dev) 158static void davinci_i2c_recover_bus(struct davinci_i2c_dev *dev)
159{ 159{
160 u32 flag = 0; 160 u32 flag = 0;
161 struct davinci_i2c_platform_data *pdata = dev->pdata; 161 struct davinci_i2c_platform_data *pdata = dev->pdata;
@@ -166,7 +166,7 @@ static void i2c_recover_bus(struct davinci_i2c_dev *dev)
166 flag |= DAVINCI_I2C_MDR_NACK; 166 flag |= DAVINCI_I2C_MDR_NACK;
167 /* write the data into mode register */ 167 /* write the data into mode register */
168 davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag); 168 davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag);
169 generic_i2c_clock_pulse(pdata->scl_pin); 169 davinci_i2c_clock_pulse(pdata->scl_pin);
170 /* Send STOP */ 170 /* Send STOP */
171 flag = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG); 171 flag = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG);
172 flag |= DAVINCI_I2C_MDR_STP; 172 flag |= DAVINCI_I2C_MDR_STP;
@@ -289,7 +289,7 @@ static int i2c_davinci_wait_bus_not_busy(struct davinci_i2c_dev *dev,
289 return -ETIMEDOUT; 289 return -ETIMEDOUT;
290 } else { 290 } else {
291 to_cnt = 0; 291 to_cnt = 0;
292 i2c_recover_bus(dev); 292 davinci_i2c_recover_bus(dev);
293 i2c_davinci_init(dev); 293 i2c_davinci_init(dev);
294 } 294 }
295 } 295 }
@@ -379,7 +379,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
379 dev->adapter.timeout); 379 dev->adapter.timeout);
380 if (r == 0) { 380 if (r == 0) {
381 dev_err(dev->dev, "controller timed out\n"); 381 dev_err(dev->dev, "controller timed out\n");
382 i2c_recover_bus(dev); 382 davinci_i2c_recover_bus(dev);
383 i2c_davinci_init(dev); 383 i2c_davinci_init(dev);
384 dev->buf_len = 0; 384 dev->buf_len = 0;
385 return -ETIMEDOUT; 385 return -ETIMEDOUT;