Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: davinci: reword according to newest specification

Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
specifications and replace "master/slave" with more appropriate terms.
Remove and reword comments while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>

authored by

Wolfram Sang and committed by
Andi Shyti
68e4c181 828434af

+8 -9
+8 -9
drivers/i2c/busses/i2c-davinci.c
··· 263 263 /* compute clock dividers */ 264 264 i2c_davinci_calc_clk_dividers(dev); 265 265 266 - /* Respond at reserved "SMBus Host" slave address" (and zero); 266 + /* Respond at reserved "SMBus Host" target address" (and zero); 267 267 * we seem to have no option to not respond... 268 268 */ 269 269 davinci_i2c_write_reg(dev, DAVINCI_I2C_OAR_REG, DAVINCI_I2C_OWN_ADDRESS); ··· 407 407 } 408 408 409 409 /* 410 - * Low level master read/write transaction. This function is called 411 - * from i2c_davinci_xfer. 410 + * Low level read/write transaction. This function is called from 411 + * i2c_davinci_xfer. 412 412 */ 413 413 static int 414 414 i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) ··· 428 428 if (pdata->bus_delay) 429 429 udelay(pdata->bus_delay); 430 430 431 - /* set the slave address */ 431 + /* set the target address */ 432 432 davinci_i2c_write_reg(dev, DAVINCI_I2C_SAR_REG, msg->addr); 433 433 434 434 dev->buf = msg->buf; ··· 440 440 reinit_completion(&dev->cmd_complete); 441 441 dev->cmd_err = 0; 442 442 443 - /* Take I2C out of reset and configure it as master */ 443 + /* Take I2C out of reset and configure it as controller */ 444 444 flag = DAVINCI_I2C_MDR_IRS | DAVINCI_I2C_MDR_MST; 445 445 446 - /* if the slave address is ten bit address, enable XA bit */ 447 446 if (msg->flags & I2C_M_TEN) 448 447 flag |= DAVINCI_I2C_MDR_XA; 449 448 if (!(msg->flags & I2C_M_RD)) ··· 686 687 break; 687 688 688 689 case DAVINCI_I2C_IVR_AAS: 689 - dev_dbg(dev->dev, "Address as slave interrupt\n"); 690 + dev_dbg(dev->dev, "Address as target interrupt\n"); 690 691 break; 691 692 692 693 default: ··· 743 744 #endif 744 745 745 746 static const struct i2c_algorithm i2c_davinci_algo = { 746 - .master_xfer = i2c_davinci_xfer, 747 - .functionality = i2c_davinci_func, 747 + .xfer = i2c_davinci_xfer, 748 + .functionality = i2c_davinci_func, 748 749 }; 749 750 750 751 static const struct of_device_id davinci_i2c_of_match[] = {