Commit b29156b3 authored by Troy Kisky's avatar Troy Kisky Committed by Kevin Hilman

I2C: ARM: DaVinci: cleanup spacing, spelling

Cleanup spacing and spelling mistakes.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
parent 180ab84f
......@@ -175,13 +175,13 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev)
* if PSC > 1 , d = 5
*/
/* get minimum of 7mHz clock, but max of 12mHz */
psc = (input_clock/7000000)-1;
if ((input_clock/(psc+1)) > 12000000)
psc++;
/* get minimum of 7 MHz clock, but max of 12 MHz */
psc = (input_clock / 7000000) - 1;
if ((input_clock / (psc + 1)) > 12000000)
psc++; /* better to run under spec than over */
d = (psc >= 2)? 5 : 7 - psc;
clk = ((input_clock/(psc+1)) / (pdata->bus_freq * 1000)) - (d<<1);
clk = ((input_clock / (psc + 1)) / (pdata->bus_freq * 1000)) - (d<<1);
clkh = clk>>1;
clkl = clk - clkh;
......@@ -189,14 +189,14 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev)
davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKH_REG, clkh);
davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKL_REG, clkl);
dev_dbg(dev->dev, "input_clock=%d, CLK = %d\n", input_clock, clk);
dev_dbg(dev->dev, "input_clock = %d, CLK = %d\n", input_clock, clk);
dev_dbg(dev->dev, "PSC = %d\n",
davinci_i2c_read_reg(dev, DAVINCI_I2C_PSC_REG));
dev_dbg(dev->dev, "CLKL = %d\n",
davinci_i2c_read_reg(dev, DAVINCI_I2C_CLKL_REG));
dev_dbg(dev->dev, "CLKH = %d\n",
davinci_i2c_read_reg(dev, DAVINCI_I2C_CLKH_REG));
dev_dbg(dev->dev, "bus_freq = %dkHz bus_delay = %d\n",
dev_dbg(dev->dev, "bus_freq = %dkHz, bus_delay = %d\n",
pdata->bus_freq, pdata->bus_delay);
/* Take the I2C module out of reset: */
......@@ -362,7 +362,7 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
for (i = 0; i < num; i++) {
ret = i2c_davinci_xfer_msg(adap, &msgs[i], (i == (num - 1)));
dev_dbg(dev->dev, "%s ret: %d\n", __FUNCTION__, ret);
dev_dbg(dev->dev, "%s ret: %d\n", __func__, ret);
if (ret < 0)
return ret;
}
......
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