i2c: ls2x: 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. 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>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Loongson-2K/Loongson LS7A I2C master mode driver
|
* Loongson-2K/Loongson LS7A I2C controller mode driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Loongson Technology Corporation Limited.
|
* Copyright (C) 2013 Loongson Technology Corporation Limited.
|
||||||
* Copyright (C) 2014-2017 Lemote, Inc.
|
* Copyright (C) 2014-2017 Lemote, Inc.
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
/* Control Register Bit */
|
/* Control Register Bit */
|
||||||
#define LS2X_CTR_EN BIT(7) /* 0: I2c frequency setting 1: Normal */
|
#define LS2X_CTR_EN BIT(7) /* 0: I2c frequency setting 1: Normal */
|
||||||
#define LS2X_CTR_IEN BIT(6) /* Enable i2c interrupt */
|
#define LS2X_CTR_IEN BIT(6) /* Enable i2c interrupt */
|
||||||
#define LS2X_CTR_MST BIT(5) /* 0: Slave mode 1: Master mode */
|
#define LS2X_CTR_MST BIT(5) /* 0: Target mode 1: Controller mode */
|
||||||
#define CTR_FREQ_MASK GENMASK(7, 6)
|
#define CTR_FREQ_MASK GENMASK(7, 6)
|
||||||
#define CTR_READY_MASK GENMASK(7, 5)
|
#define CTR_READY_MASK GENMASK(7, 5)
|
||||||
|
|
||||||
@@ -251,8 +251,7 @@ static int ls2x_i2c_xfer_one(struct ls2x_i2c_priv *priv,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ls2x_i2c_master_xfer(struct i2c_adapter *adap,
|
static int ls2x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
|
||||||
struct i2c_msg *msgs, int num)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct i2c_msg *msg, *emsg = msgs + num;
|
struct i2c_msg *msg, *emsg = msgs + num;
|
||||||
@@ -273,8 +272,8 @@ static unsigned int ls2x_i2c_func(struct i2c_adapter *adap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct i2c_algorithm ls2x_i2c_algo = {
|
static const struct i2c_algorithm ls2x_i2c_algo = {
|
||||||
.master_xfer = ls2x_i2c_master_xfer,
|
.xfer = ls2x_i2c_xfer,
|
||||||
.functionality = ls2x_i2c_func,
|
.functionality = ls2x_i2c_func,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ls2x_i2c_probe(struct platform_device *pdev)
|
static int ls2x_i2c_probe(struct platform_device *pdev)
|
||||||
|
|||||||
Reference in New Issue
Block a user