diff mbox series

[11/64] i2c: cadence: reword according to newest specification

Message ID 20240322132619.6389-12-wsa+renesas@sang-engineering.com
State Changes Requested
Headers show
Series i2c: reword i2c_algorithm according to newest specification | expand

Commit Message

Wolfram Sang March 22, 2024, 1:25 p.m. UTC
Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-cadence.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Andi Shyti March 26, 2024, 7:06 p.m. UTC | #1
Hi Wolfram,

>  static const struct i2c_algorithm cdns_i2c_algo = {
> -	.master_xfer	= cdns_i2c_master_xfer,
> +	.xfer	= cdns_i2c_xfer,

alignment :-)

Andi
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 4bb7d6756947..91085e719689 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -808,7 +808,7 @@  static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,
 }
 
 /**
- * cdns_i2c_master_xfer - The main i2c transfer function
+ * cdns_i2c_xfer - The main i2c transfer function
  * @adap:	pointer to the i2c adapter driver instance
  * @msgs:	pointer to the i2c message structure
  * @num:	the number of messages to transfer
@@ -817,7 +817,7 @@  static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,
  *
  * Return: number of msgs processed on success, negative error otherwise
  */
-static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+static int cdns_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 				int num)
 {
 	int ret, count;
@@ -947,7 +947,7 @@  static u32 cdns_i2c_func(struct i2c_adapter *adap)
 }
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-static int cdns_reg_slave(struct i2c_client *slave)
+static int cdns_reg_target(struct i2c_client *slave)
 {
 	int ret;
 	struct cdns_i2c *id = container_of(slave->adapter, struct cdns_i2c,
@@ -972,7 +972,7 @@  static int cdns_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int cdns_unreg_slave(struct i2c_client *slave)
+static int cdns_unreg_target(struct i2c_client *slave)
 {
 	struct cdns_i2c *id = container_of(slave->adapter, struct cdns_i2c,
 									adap);
@@ -990,11 +990,11 @@  static int cdns_unreg_slave(struct i2c_client *slave)
 #endif
 
 static const struct i2c_algorithm cdns_i2c_algo = {
-	.master_xfer	= cdns_i2c_master_xfer,
+	.xfer	= cdns_i2c_xfer,
 	.functionality	= cdns_i2c_func,
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-	.reg_slave	= cdns_reg_slave,
-	.unreg_slave	= cdns_unreg_slave,
+	.reg_target	= cdns_reg_target,
+	.unreg_target	= cdns_unreg_target,
 #endif
 };