#define VT1632_TMDS 0x01
#define INTEGRATED_TMDS 0x42
-/* Definition TMDS Trasmitter I2C Slave Address */
+/* Definition TMDS Trasmitter I2C Target Address */
#define VT1632_TMDS_I2C_ADDR 0x10
/**************************************************/
#define TX_DATA_DDR_MODE 0x04
#define TX_DATA_SDR_MODE 0x08
-/* Definition LVDS Trasmitter I2C Slave Address */
+/* Definition LVDS Trasmitter I2C Target Address */
#define VT1631_LVDS_I2C_ADDR 0x70
#define VT3271_LVDS_I2C_ADDR 0x80
#define VT1636_LVDS_I2C_ADDR 0x80
struct tmds_chip_information {
int tmds_chip_name;
- int tmds_chip_slave_addr;
+ int tmds_chip_target_addr;
int output_interface;
int i2c_port;
};
struct lvds_chip_information {
int lvds_chip_name;
- int lvds_chip_slave_addr;
+ int lvds_chip_target_addr;
int output_interface;
int i2c_port;
};
/* Check for VT1632: */
viaparinfo->chip_info->tmds_chip_info.tmds_chip_name = VT1632_TMDS;
viaparinfo->chip_info->
- tmds_chip_info.tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR;
+ tmds_chip_info.tmds_chip_target_addr = VT1632_TMDS_I2C_ADDR;
viaparinfo->chip_info->tmds_chip_info.i2c_port = VIA_PORT_31;
if (check_tmds_chip(VT1632_DEVICE_ID_REG, VT1632_DEVICE_ID)) {
/*
viaparinfo->chip_info->
tmds_chip_info.tmds_chip_name = NON_TMDS_TRANSMITTER;
viaparinfo->chip_info->tmds_chip_info.
- tmds_chip_slave_addr = VT1632_TMDS_I2C_ADDR;
+ tmds_chip_target_addr = VT1632_TMDS_I2C_ADDR;
return false;
}
static void tmds_register_write(int index, u8 data)
{
viafb_i2c_writebyte(viaparinfo->chip_info->tmds_chip_info.i2c_port,
- viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
+ viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr,
index, data);
}
u8 data;
viafb_i2c_readbyte(viaparinfo->chip_info->tmds_chip_info.i2c_port,
- (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
+ (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr,
(u8) index, &data);
return data;
}
static int tmds_register_read_bytes(int index, u8 *buff, int buff_len)
{
viafb_i2c_readbytes(viaparinfo->chip_info->tmds_chip_info.i2c_port,
- (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr,
+ (u8) viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr,
(u8) index, buff, buff_len);
return 0;
}
DEBUG_MSG(KERN_INFO "viafb_dvi_query_EDID!!\n");
- restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr;
- viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = 0xA0;
+ restore = viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr;
+ viaparinfo->chip_info->tmds_chip_info.tmds_chip_target_addr = 0xA0;
data0 = (u8) tmds_register_read(0x00);
data1 = (u8) tmds_register_read(0x01);
if ((data0 == 0) && (data1 == 0xFF)) {
viaparinfo->chip_info->
- tmds_chip_info.tmds_chip_slave_addr = restore;
+ tmds_chip_info.tmds_chip_target_addr = restore;
return EDID_VERSION_1; /* Found EDID1 Table */
}
DEBUG_MSG(KERN_INFO "\n dvi_get_panel_size_from_DDCv1 \n");
- restore = tmds_chip->tmds_chip_slave_addr;
- tmds_chip->tmds_chip_slave_addr = 0xA0;
+ restore = tmds_chip->tmds_chip_target_addr;
+ tmds_chip->tmds_chip_target_addr = 0xA0;
for (i = 0x25; i < 0x6D; i++) {
switch (i) {
case 0x36:
DEBUG_MSG(KERN_INFO "DVI max pixelclock = %d\n",
tmds_setting->max_pixel_clock);
- tmds_chip->tmds_chip_slave_addr = restore;
+ tmds_chip->tmds_chip_target_addr = restore;
}
/* If Disable DVI, turn off pad */
viafb_i2c_writebyte(viaparinfo->chip_info->
tmds_chip_info.i2c_port,
viaparinfo->chip_info->
- tmds_chip_info.tmds_chip_slave_addr,
+ tmds_chip_info.tmds_chip_target_addr,
0x08, data);
}
}
return true;
/* Check for VT1631: */
viaparinfo->chip_info->lvds_chip_info.lvds_chip_name = VT1631_LVDS;
- viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
+ viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr =
VT1631_LVDS_I2C_ADDR;
if (check_lvds_chip(VT1631_DEVICE_ID_REG, VT1631_DEVICE_ID)) {
viaparinfo->chip_info->lvds_chip_info.lvds_chip_name =
NON_LVDS_TRANSMITTER;
- viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
+ viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr =
VT1631_LVDS_I2C_ADDR;
return false;
}
u8 data;
viafb_i2c_readbyte(VIA_PORT_2C,
- (u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr,
+ (u8) viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr,
(u8) index, &data);
return data;
}
struct list_head chain; /* chain to support multiple drivers */
struct via_aux_bus *bus; /* the I2C bus used */
- u8 addr; /* the I2C slave address */
+ u8 addr; /* the I2C target address */
const char *name; /* human readable name of the driver */
void *data; /* private data of this driver */
spin_unlock_irqrestore(&i2c_vdev->reg_lock, flags);
}
-int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata)
+int viafb_i2c_readbyte(u8 adap, u8 target_addr, u8 index, u8 *pdata)
{
int ret;
u8 mm1[] = {0x00};
*pdata = 0;
msgs[0].flags = 0;
msgs[1].flags = I2C_M_RD;
- msgs[0].addr = msgs[1].addr = slave_addr / 2;
+ msgs[0].addr = msgs[1].addr = target_addr / 2;
mm1[0] = index;
msgs[0].len = 1; msgs[1].len = 1;
msgs[0].buf = mm1; msgs[1].buf = pdata;
return ret;
}
-int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data)
+int viafb_i2c_writebyte(u8 adap, u8 target_addr, u8 index, u8 data)
{
int ret;
u8 msg[2] = { index, data };
if (!via_i2c_par[adap].is_active)
return -ENODEV;
msgs.flags = 0;
- msgs.addr = slave_addr / 2;
+ msgs.addr = target_addr / 2;
msgs.len = 2;
msgs.buf = msg;
ret = i2c_transfer(&via_i2c_par[adap].adapter, &msgs, 1);
return ret;
}
-int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len)
+int viafb_i2c_readbytes(u8 adap, u8 target_addr, u8 index, u8 *buff, int buff_len)
{
int ret;
u8 mm1[] = {0x00};
return -ENODEV;
msgs[0].flags = 0;
msgs[1].flags = I2C_M_RD;
- msgs[0].addr = msgs[1].addr = slave_addr / 2;
+ msgs[0].addr = msgs[1].addr = target_addr / 2;
mm1[0] = index;
msgs[0].len = 1; msgs[1].len = buff_len;
msgs[0].buf = mm1; msgs[1].buf = buff;
u8 data;
viafb_i2c_readbyte(plvds_chip_info->i2c_port,
- plvds_chip_info->lvds_chip_slave_addr, index, &data);
+ plvds_chip_info->lvds_chip_target_addr, index, &data);
return data;
}
data = (data & (~io_data.Mask)) | io_data.Data;
viafb_i2c_writebyte(plvds_chip_info->i2c_port,
- plvds_chip_info->lvds_chip_slave_addr, index, data);
+ plvds_chip_info->lvds_chip_target_addr, index, data);
}
void viafb_init_lvds_vt1636(struct lvds_setting_information
DEBUG_MSG(KERN_INFO "viafb_lvds_identify_vt1636.\n");
/* Sense VT1636 LVDS Transmiter */
- viaparinfo->chip_info->lvds_chip_info.lvds_chip_slave_addr =
+ viaparinfo->chip_info->lvds_chip_info.lvds_chip_target_addr =
VT1636_LVDS_I2C_ADDR;
/* Check vendor ID first: */