Skip to content

Commit 8b5ea90

Browse files
easwarhhdeller
authored andcommitted
fbdev: viafb: Make I2C terminology more inclusive
I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann <[email protected]> Signed-off-by: Easwar Hariharan <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 3cf12ca commit 8b5ea90

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

drivers/video/fbdev/via/chip.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
#define VT1632_TMDS 0x01
7070
#define INTEGRATED_TMDS 0x42
7171

72-
/* Definition TMDS Trasmitter I2C Slave Address */
72+
/* Definition TMDS Trasmitter I2C Target Address */
7373
#define VT1632_TMDS_I2C_ADDR 0x10
7474

7575
/**************************************************/
@@ -88,21 +88,21 @@
8888
#define TX_DATA_DDR_MODE 0x04
8989
#define TX_DATA_SDR_MODE 0x08
9090

91-
/* Definition LVDS Trasmitter I2C Slave Address */
91+
/* Definition LVDS Trasmitter I2C Target Address */
9292
#define VT1631_LVDS_I2C_ADDR 0x70
9393
#define VT3271_LVDS_I2C_ADDR 0x80
9494
#define VT1636_LVDS_I2C_ADDR 0x80
9595

9696
struct tmds_chip_information {
9797
int tmds_chip_name;
98-
int tmds_chip_slave_addr;
98+
int tmds_chip_target_addr;
9999
int output_interface;
100100
int i2c_port;
101101
};
102102

103103
struct lvds_chip_information {
104104
int lvds_chip_name;
105-
int lvds_chip_slave_addr;
105+
int lvds_chip_target_addr;
106106
int output_interface;
107107
int i2c_port;
108108
};

drivers/video/fbdev/via/dvi.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool viafb_tmds_trasmitter_identify(void)
7070
/* Check for VT1632: */
7171
viaparinfo->chip_info->tmds_chip_info.tmds_chip_name = VT1632_TMDS;
7272
viaparinfo->chip_info->
73-
tmds_chip_info.tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR;
73+
tmds_chip_info.tmds_chip_target_addr = VT1632_TMDS_I2C_ADDR;
7474
viaparinfo->chip_info->tmds_chip_info.i2c_port = VIA_PORT_31;
7575
if (check_tmds_chip(VT1632_DEVICE_ID_REG, VT1632_DEVICE_ID)) {
7676
/*
@@ -128,14 +128,14 @@ bool viafb_tmds_trasmitter_identify(void)
128128
viaparinfo->chip_info->
129129
tmds_chip_info.tmds_chip_name = NON_TMDS_TRANSMITTER;
130130
viaparinfo->chip_info->tmds_chip_info.
131-
tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR;
131+
tmds_chip_target_addr = VT1632_TMDS_I2C_ADDR;
132132
return false;
133133
}
134134

135135
static void tmds_register_write(int index, u8 data)
136136
{
137137
viafb_i2c_writebyte(viaparinfo->chip_info->tmds_chip_info.i2c_port,
138-
viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
138+
viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr,
139139
index, data);
140140
}
141141

@@ -144,15 +144,15 @@ static int tmds_register_read(int index)
144144
u8 data;
145145

146146
viafb_i2c_readbyte(viaparinfo->chip_info->tmds_chip_info.i2c_port,
147-
(u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
147+
(u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr,
148148
(u8) index, &data);
149149
return data;
150150
}
151151

152152
static int tmds_register_read_bytes(int index, u8 *buff, int buff_len)
153153
{
154154
viafb_i2c_readbytes(viaparinfo->chip_info->tmds_chip_info.i2c_port,
155-
(u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
155+
(u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr,
156156
(u8) index, buff, buff_len);
157157
return 0;
158158
}
@@ -256,14 +256,14 @@ static int viafb_dvi_query_EDID(void)
256256

257257
DEBUG_MSG(KERN_INFO "viafb_dvi_query_EDID!!\n");
258258

259-
restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr;
260-
viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = 0xA0;
259+
restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr;
260+
viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr = 0xA0;
261261

262262
data0 = (u8) tmds_register_read(0x00);
263263
data1 = (u8) tmds_register_read(0x01);
264264
if ((data0 == 0) && (data1 == 0xFF)) {
265265
viaparinfo->chip_info->
266-
tmds_chip_info.tmds_chip_slave_addr = restore;
266+
tmds_chip_info.tmds_chip_target_addr = restore;
267267
return EDID_VERSION_1; /* Found EDID1 Table */
268268
}
269269

@@ -280,8 +280,8 @@ static void dvi_get_panel_size_from_DDCv1(
280280

281281
DEBUG_MSG(KERN_INFO "\n dvi_get_panel_size_from_DDCv1 \n");
282282

283-
restore = tmds_chip->tmds_chip_slave_addr;
284-
tmds_chip->tmds_chip_slave_addr = 0xA0;
283+
restore = tmds_chip->tmds_chip_target_addr;
284+
tmds_chip->tmds_chip_target_addr = 0xA0;
285285
for (i = 0x25; i < 0x6D; i++) {
286286
switch (i) {
287287
case 0x36:
@@ -306,7 +306,7 @@ static void dvi_get_panel_size_from_DDCv1(
306306

307307
DEBUG_MSG(KERN_INFO "DVI max pixelclock = %d\n",
308308
tmds_setting->max_pixel_clock);
309-
tmds_chip->tmds_chip_slave_addr = restore;
309+
tmds_chip->tmds_chip_target_addr = restore;
310310
}
311311

312312
/* If Disable DVI, turn off pad */
@@ -427,7 +427,7 @@ void viafb_dvi_enable(void)
427427
viafb_i2c_writebyte(viaparinfo->chip_info->
428428
tmds_chip_info.i2c_port,
429429
viaparinfo->chip_info->
430-
tmds_chip_info.tmds_chip_slave_addr,
430+
tmds_chip_info.tmds_chip_target_addr,
431431
0x08, data);
432432
}
433433
}

drivers/video/fbdev/via/lcd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ bool viafb_lvds_trasmitter_identify(void)
147147
return true;
148148
/* Check for VT1631: */
149149
viaparinfo->chip_info->lvds_chip_info.lvds_chip_name = VT1631_LVDS;
150-
viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
150+
viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr =
151151
VT1631_LVDS_I2C_ADDR;
152152

153153
if (check_lvds_chip(VT1631_DEVICE_ID_REG, VT1631_DEVICE_ID)) {
@@ -161,7 +161,7 @@ bool viafb_lvds_trasmitter_identify(void)
161161

162162
viaparinfo->chip_info->lvds_chip_info.lvds_chip_name =
163163
NON_LVDS_TRANSMITTER;
164-
viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
164+
viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr =
165165
VT1631_LVDS_I2C_ADDR;
166166
return false;
167167
}
@@ -327,7 +327,7 @@ static int lvds_register_read(int index)
327327
u8 data;
328328

329329
viafb_i2c_readbyte(VIA_PORT_2C,
330-
(u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr,
330+
(u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr,
331331
(u8) index, &data);
332332
return data;
333333
}

drivers/video/fbdev/via/via_aux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct via_aux_drv {
2424
struct list_head chain; /* chain to support multiple drivers */
2525

2626
struct via_aux_bus *bus; /* the I2C bus used */
27-
u8 addr; /* the I2C slave address */
27+
u8 addr; /* the I2C target address */
2828

2929
const char *name; /* human readable name of the driver */
3030
void *data; /* private data of this driver */

drivers/video/fbdev/via/via_i2c.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static void via_i2c_setsda(void *data, int state)
104104
spin_unlock_irqrestore(&i2c_vdev->reg_lock, flags);
105105
}
106106

107-
int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
107+
int viafb_i2c_readbyte(u8 adap, u8 target_addr, u8 index, u8 *pdata)
108108
{
109109
int ret;
110110
u8 mm1[] = {0x00};
@@ -115,7 +115,7 @@ int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
115115
*pdata = 0;
116116
msgs[0].flags = 0;
117117
msgs[1].flags = I2C_M_RD;
118-
msgs[0].addr = msgs[1].addr = slave_addr / 2;
118+
msgs[0].addr = msgs[1].addr = target_addr / 2;
119119
mm1[0] = index;
120120
msgs[0].len = 1; msgs[1].len = 1;
121121
msgs[0].buf = mm1; msgs[1].buf = pdata;
@@ -128,7 +128,7 @@ int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
128128
return ret;
129129
}
130130

131-
int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
131+
int viafb_i2c_writebyte(u8 adap, u8 target_addr, u8 index, u8 data)
132132
{
133133
int ret;
134134
u8 msg[2] = { index, data };
@@ -137,7 +137,7 @@ int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
137137
if (!via_i2c_par[adap].is_active)
138138
return -ENODEV;
139139
msgs.flags = 0;
140-
msgs.addr = slave_addr / 2;
140+
msgs.addr = target_addr / 2;
141141
msgs.len = 2;
142142
msgs.buf = msg;
143143
ret = i2c_transfer(&via_i2c_par[adap].adapter, &msgs, 1);
@@ -149,7 +149,7 @@ int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
149149
return ret;
150150
}
151151

152-
int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len)
152+
int viafb_i2c_readbytes(u8 adap, u8 target_addr, u8 index, u8 *buff, int buff_len)
153153
{
154154
int ret;
155155
u8 mm1[] = {0x00};
@@ -159,7 +159,7 @@ int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len
159159
return -ENODEV;
160160
msgs[0].flags = 0;
161161
msgs[1].flags = I2C_M_RD;
162-
msgs[0].addr = msgs[1].addr = slave_addr / 2;
162+
msgs[0].addr = msgs[1].addr = target_addr / 2;
163163
mm1[0] = index;
164164
msgs[0].len = 1; msgs[1].len = buff_len;
165165
msgs[0].buf = mm1; msgs[1].buf = buff;

drivers/video/fbdev/via/vt1636.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information
4444
u8 data;
4545

4646
viafb_i2c_readbyte(plvds_chip_info->i2c_port,
47-
plvds_chip_info->lvds_chip_slave_addr, index, &data);
47+
plvds_chip_info->lvds_chip_target_addr, index, &data);
4848
return data;
4949
}
5050

@@ -60,7 +60,7 @@ void viafb_gpio_i2c_write_mask_lvds(struct lvds_setting_information
6060
data = (data & (~io_data.Mask)) | io_data.Data;
6161

6262
viafb_i2c_writebyte(plvds_chip_info->i2c_port,
63-
plvds_chip_info->lvds_chip_slave_addr, index, data);
63+
plvds_chip_info->lvds_chip_target_addr, index, data);
6464
}
6565

6666
void viafb_init_lvds_vt1636(struct lvds_setting_information
@@ -113,7 +113,7 @@ bool viafb_lvds_identify_vt1636(u8 i2c_adapter)
113113
DEBUG_MSG(KERN_INFO "viafb_lvds_identify_vt1636.\n");
114114

115115
/* Sense VT1636 LVDS Transmiter */
116-
viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
116+
viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr =
117117
VT1636_LVDS_I2C_ADDR;
118118

119119
/* Check vendor ID first: */

0 commit comments

Comments
 (0)