Skip to content

Commit d670ca5

Browse files
Wolfram SangAndi Shyti
authored andcommitted
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>
1 parent 8c68907 commit d670ca5

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

drivers/i2c/busses/i2c-ls2x.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
3-
* Loongson-2K/Loongson LS7A I2C master mode driver
3+
* Loongson-2K/Loongson LS7A I2C controller mode driver
44
*
55
* Copyright (C) 2013 Loongson Technology Corporation Limited.
66
* Copyright (C) 2014-2017 Lemote, Inc.
@@ -51,7 +51,7 @@
5151
/* Control Register Bit */
5252
#define LS2X_CTR_EN BIT(7) /* 0: I2c frequency setting 1: Normal */
5353
#define LS2X_CTR_IEN BIT(6) /* Enable i2c interrupt */
54-
#define LS2X_CTR_MST BIT(5) /* 0: Slave mode 1: Master mode */
54+
#define LS2X_CTR_MST BIT(5) /* 0: Target mode 1: Controller mode */
5555
#define CTR_FREQ_MASK GENMASK(7, 6)
5656
#define CTR_READY_MASK GENMASK(7, 5)
5757

@@ -251,8 +251,7 @@ static int ls2x_i2c_xfer_one(struct ls2x_i2c_priv *priv,
251251
return ret;
252252
}
253253

254-
static int ls2x_i2c_master_xfer(struct i2c_adapter *adap,
255-
struct i2c_msg *msgs, int num)
254+
static int ls2x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
256255
{
257256
int ret;
258257
struct i2c_msg *msg, *emsg = msgs + num;
@@ -273,8 +272,8 @@ static unsigned int ls2x_i2c_func(struct i2c_adapter *adap)
273272
}
274273

275274
static const struct i2c_algorithm ls2x_i2c_algo = {
276-
.master_xfer = ls2x_i2c_master_xfer,
277-
.functionality = ls2x_i2c_func,
275+
.xfer = ls2x_i2c_xfer,
276+
.functionality = ls2x_i2c_func,
278277
};
279278

280279
static int ls2x_i2c_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)