[PATCH 48/64] i2c: sh7760: reword according to newest specification

Wolfram Sang posted 64 patches 7 months, 3 weeks ago
[PATCH 48/64] i2c: sh7760: reword according to newest specification
Posted by Wolfram Sang 7 months, 3 weeks ago
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-sh7760.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index 8a043f5fca1e..49e83ca89101 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -55,7 +55,7 @@
 #define MSR_MDE		0x08
 #define MSR_MDT		0x04
 #define MSR_MDR		0x02
-#define MSR_MAT		0x01		/* slave addr xfer done	*/
+#define MSR_MAT		0x01		/* addr xfer done	*/
 
 #define MIE_MNRE	0x40		/* nack irq en		*/
 #define MIE_MALE	0x20		/* arblos irq en	*/
@@ -154,7 +154,7 @@ static irqreturn_t sh7760_i2c_irq(int irq, void *ptr)
 		goto out;
 	}
 
-	/* i2c slave addr was sent; set to "normal" operation */
+	/* i2c client addr was sent; set to "normal" operation */
 	if (msr & MSR_MAT)
 		OUT32(id, I2CMCR, MCR_MIE);
 
@@ -236,14 +236,14 @@ static irqreturn_t sh7760_i2c_irq(int irq, void *ptr)
 }
 
 
-/* prepare and start a master receive operation */
+/* prepare and start a host receive operation */
 static void sh7760_i2c_mrecv(struct cami2c *id)
 {
 	int len;
 
 	id->flags |= IDF_RECV;
 
-	/* set the slave addr reg; otherwise rcv wont work! */
+	/* set the target addr reg; otherwise rcv won't work! */
 	OUT32(id, I2CSAR, 0xfe);
 	OUT32(id, I2CMAR, (id->msg->addr << 1) | 1);
 
@@ -262,14 +262,14 @@ static void sh7760_i2c_mrecv(struct cami2c *id)
 	OUT32(id, I2CFIER, FIER_RXIE);
 }
 
-/* prepare and start a master send operation */
+/* prepare and start a host send operation */
 static void sh7760_i2c_msend(struct cami2c *id)
 {
 	int len;
 
 	id->flags |= IDF_SEND;
 
-	/* set the slave addr reg; otherwise xmit wont work! */
+	/* set the target addr reg; otherwise xmit won't work! */
 	OUT32(id, I2CSAR, 0xfe);
 	OUT32(id, I2CMAR, (id->msg->addr << 1) | 0);
 
@@ -300,7 +300,7 @@ static inline int sh7760_i2c_busy_check(struct cami2c *id)
 	return (IN32(id, I2CMCR) & MCR_FSDA);
 }
 
-static int sh7760_i2c_master_xfer(struct i2c_adapter *adap,
+static int sh7760_i2c_xfer(struct i2c_adapter *adap,
 				  struct i2c_msg *msgs,
 				  int num)
 {
@@ -362,7 +362,7 @@ static int sh7760_i2c_master_xfer(struct i2c_adapter *adap,
 	OUT32(id, I2CMIER, 0);
 	OUT32(id, I2CFIER, 0);
 
-	/* reset slave module registers too: master mode enables slave
+	/* reset target module registers too: host mode enables target
 	 * module for receive ops (ack, data). Without this reset,
 	 * eternal bus activity might be reported after NACK / ARBLOST.
 	 */
@@ -379,7 +379,7 @@ static u32 sh7760_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm sh7760_i2c_algo = {
-	.master_xfer	= sh7760_i2c_master_xfer,
+	.xfer	= sh7760_i2c_xfer,
 	.functionality	= sh7760_i2c_func,
 };
 
-- 
2.43.0