]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i2c: mlxcpld: reword according to newest specification
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 6 Jul 2024 11:20:29 +0000 (13:20 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 11 Jul 2024 13:14:14 +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>
Acked-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-mlxcpld.c

index 099291a0411dec07664bb98fbabf1b4e4e19adf4..8223f6d29eb3b22f5fc40156fda4f67d7f91b828 100644 (file)
@@ -197,8 +197,8 @@ static int mlxcpld_i2c_check_status(struct mlxcpld_i2c_priv *priv, int *status)
        if (val & MLXCPLD_LPCI2C_TRANS_END) {
                if (val & MLXCPLD_LPCI2C_STATUS_NACK)
                        /*
-                        * The slave is unable to accept the data. No such
-                        * slave, command not understood, or unable to accept
+                        * The target is unable to accept the data. No such
+                        * target, command not understood, or unable to accept
                         * any more data.
                         */
                        *status = MLXCPLD_LPCI2C_NACK_IND;
@@ -280,7 +280,7 @@ static int mlxcpld_i2c_wait_for_free(struct mlxcpld_i2c_priv *priv)
 }
 
 /*
- * Wait for master transfer to complete.
+ * Wait for transfer to complete.
  * It puts current process to sleep until we get interrupt or timeout expires.
  * Returns the number of transferred or read bytes or error (<0).
  */
@@ -315,7 +315,7 @@ static int mlxcpld_i2c_wait_for_tc(struct mlxcpld_i2c_priv *priv)
                /*
                 * Actual read data len will be always the same as
                 * requested len. 0xff (line pull-up) will be returned
-                * if slave has no data to return. Thus don't read
+                * if target has no data to return. Thus don't read
                 * MLXCPLD_LPCI2C_NUM_DAT_REG reg from CPLD.  Only in case of
                 * SMBus block read transaction data len can be different,
                 * check this case.
@@ -375,7 +375,7 @@ static void mlxcpld_i2c_xfer_msg(struct mlxcpld_i2c_priv *priv)
        }
 
        /*
-        * Set target slave address with command for master transfer.
+        * Set target address with command for transfer.
         * It should be latest executed function before CPLD transaction.
         */
        cmd = (priv->xfer.msg[0].addr << 1) | priv->xfer.cmd;
@@ -449,8 +449,8 @@ static u32 mlxcpld_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm mlxcpld_i2c_algo = {
-       .master_xfer    = mlxcpld_i2c_xfer,
-       .functionality  = mlxcpld_i2c_func
+       .xfer = mlxcpld_i2c_xfer,
+       .functionality = mlxcpld_i2c_func
 };
 
 static const struct i2c_adapter_quirks mlxcpld_i2c_quirks = {