]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i2c: octeon: reword according to newest specification
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 6 Jul 2024 11:20:34 +0000 (13:20 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 11 Jul 2024 13:14:16 +0000 (15:14 +0200)
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
specifications and replace "master/slave" with more appropriate terms.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-octeon-core.c
drivers/i2c/busses/i2c-octeon-core.h
drivers/i2c/busses/i2c-octeon-platdrv.c

index 5b7b942141e725c7f9071c217c728efce067cee6..16cc34a0526e6e49e742cb095cf4d5b969bd00f0 100644 (file)
@@ -221,14 +221,14 @@ static int octeon_i2c_check_status(struct octeon_i2c *i2c, int final_read)
        case STAT_LOST_ARB_B0:
                return -EAGAIN;
 
-       /* Being addressed as slave, should back off & listen */
+       /* Being addressed as local target, should back off & listen */
        case STAT_SLAVE_60:
        case STAT_SLAVE_70:
        case STAT_GENDATA_ACK:
        case STAT_GENDATA_NAK:
                return -EOPNOTSUPP;
 
-       /* Core busy as slave */
+       /* Core busy as local target */
        case STAT_SLAVE_80:
        case STAT_SLAVE_88:
        case STAT_SLAVE_A0:
@@ -608,7 +608,7 @@ err:
 }
 
 /**
- * octeon_i2c_xfer - The driver's master_xfer function
+ * octeon_i2c_xfer - The driver's xfer function
  * @adap: Pointer to the i2c_adapter structure
  * @msgs: Pointer to the messages to be processed
  * @num: Length of the MSGS array
index 7af01864da7522fc9485511e1feb184e8659c74f..b265e21189a1619de6b30d6e94a35aff37af18b6 100644 (file)
@@ -39,8 +39,8 @@
 /* Controller command and status bits */
 #define TWSI_CTL_CE            0x80    /* High level controller enable */
 #define TWSI_CTL_ENAB          0x40    /* Bus enable */
-#define TWSI_CTL_STA           0x20    /* Master-mode start, HW clears when done */
-#define TWSI_CTL_STP           0x10    /* Master-mode stop, HW clears when done */
+#define TWSI_CTL_STA           0x20    /* Controller-mode start, HW clears when done */
+#define TWSI_CTL_STP           0x10    /* Controller-mode stop, HW clears when done */
 #define TWSI_CTL_IFLG          0x08    /* HW event, SW writes 0 to ACK */
 #define TWSI_CTL_AAK           0x04    /* Assert ACK */
 
index 7d54b3203f71665711641dd74562ca327acebba4..dc6dff95c68ce7ad87bbee0b0d7f8c8d8b1e84f6 100644 (file)
@@ -122,7 +122,7 @@ static u32 octeon_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm octeon_i2c_algo = {
-       .master_xfer = octeon_i2c_xfer,
+       .xfer = octeon_i2c_xfer,
        .functionality = octeon_i2c_functionality,
 };