Skip to content

Commit d919298

Browse files
Wolfram SangAndi Shyti
authored andcommitted
i2c: viai2c: 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 <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent f2005ce commit d919298

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

drivers/i2c/busses/i2c-viai2c-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,6 @@ int viai2c_init(struct platform_device *pdev, struct viai2c **pi2c, int plat)
198198
}
199199
EXPORT_SYMBOL_GPL(viai2c_init);
200200

201-
MODULE_DESCRIPTION("Via/Wondermedia/Zhaoxin I2C master-mode bus adapter");
201+
MODULE_DESCRIPTION("Via/Wondermedia/Zhaoxin I2C controller core");
202202
MODULE_AUTHOR("Tony Prisk <[email protected]>");
203203
MODULE_LICENSE("GPL");

drivers/i2c/busses/i2c-viai2c-wmt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* Wondermedia I2C Master Mode Driver
3+
* Wondermedia I2C Controller Driver
44
*
55
* Copyright (C) 2012 Tony Prisk <[email protected]>
66
*
@@ -35,8 +35,8 @@ static u32 wmt_i2c_func(struct i2c_adapter *adap)
3535
}
3636

3737
static const struct i2c_algorithm wmt_i2c_algo = {
38-
.master_xfer = viai2c_xfer,
39-
.functionality = wmt_i2c_func,
38+
.xfer = viai2c_xfer,
39+
.functionality = wmt_i2c_func,
4040
};
4141

4242
static int wmt_i2c_reset_hardware(struct viai2c *i2c)
@@ -178,7 +178,7 @@ static struct platform_driver wmt_i2c_driver = {
178178

179179
module_platform_driver(wmt_i2c_driver);
180180

181-
MODULE_DESCRIPTION("Wondermedia I2C master-mode bus adapter");
181+
MODULE_DESCRIPTION("Wondermedia I2C controller driver");
182182
MODULE_AUTHOR("Tony Prisk <[email protected]>");
183183
MODULE_LICENSE("GPL");
184184
MODULE_DEVICE_TABLE(of, wmt_i2c_dt_ids);

drivers/i2c/busses/i2c-viai2c-zhaoxin.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define ZXI2C_GOLD_FSTP_400K 0x38
3939
#define ZXI2C_GOLD_FSTP_1M 0x13
4040
#define ZXI2C_GOLD_FSTP_3400K 0x37
41-
#define ZXI2C_HS_MASTER_CODE (0x08 << 8)
41+
#define ZXI2C_HS_CTRL_CODE (0x08 << 8)
4242

4343
#define ZXI2C_FIFO_SIZE 32
4444

@@ -136,7 +136,7 @@ static int viai2c_fifo_irq_xfer(struct viai2c *i2c)
136136
return 0;
137137
}
138138

139-
static int zxi2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
139+
static int zxi2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
140140
{
141141
u8 tmp;
142142
int ret;
@@ -194,8 +194,8 @@ static u32 zxi2c_func(struct i2c_adapter *adap)
194194
}
195195

196196
static const struct i2c_algorithm zxi2c_algorithm = {
197-
.master_xfer = zxi2c_master_xfer,
198-
.functionality = zxi2c_func,
197+
.xfer = zxi2c_xfer,
198+
.functionality = zxi2c_func,
199199
};
200200

201201
static const struct i2c_adapter_quirks zxi2c_quirks = {
@@ -250,9 +250,9 @@ static void zxi2c_get_bus_speed(struct viai2c *i2c)
250250

251251
i2c->tcr = params[1];
252252
priv->mcr = ioread16(i2c->base + VIAI2C_REG_MCR);
253-
/* for Hs-mode, use 0x80 as master code */
253+
/* for Hs-mode, use 0x80 as controller code */
254254
if (params[0] == I2C_MAX_HIGH_SPEED_MODE_FREQ)
255-
priv->mcr |= ZXI2C_HS_MASTER_CODE;
255+
priv->mcr |= ZXI2C_HS_CTRL_CODE;
256256

257257
dev_info(i2c->dev, "speed mode is %s\n", i2c_freq_mode_string(params[0]));
258258
}

0 commit comments

Comments
 (0)