mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-29 13:28:01 +00:00
(Kyösti)
* renamed every smbus_* access to i2c_smbus_* * everything in lm_sensors2/kernel/* compiles nicely :) git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@499 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
868b407674
commit
3014204a0d
@ -128,7 +128,7 @@ static void adm1021_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver adm1021_driver = {
|
||||
/* name */ "adm1021, MAX1617 sensor driver",
|
||||
/* id */ I2C_DRIVERID_ADM1021,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &adm1021_attach_adapter,
|
||||
/* detach_client */ &adm1021_detach_client,
|
||||
/* command */ &adm1021_command,
|
||||
@ -373,12 +373,12 @@ void adm1021_dec_use (struct i2c_client *client)
|
||||
/* All registers are byte-sized */
|
||||
int adm1021_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
return smbus_read_byte_data(client->adapter,client->addr,reg);
|
||||
return i2c_smbus_read_byte_data(client->adapter,client->addr,reg);
|
||||
}
|
||||
|
||||
int adm1021_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
}
|
||||
|
||||
void adm1021_update_client(struct i2c_client *client)
|
||||
|
@ -276,7 +276,7 @@ static struct i2c_client *adm9240_list[MAX_ADM9240_NR];
|
||||
static struct i2c_driver adm9240_driver = {
|
||||
/* name */ "ADM9240 sensor driver",
|
||||
/* id */ I2C_DRIVERID_ADM9240,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &adm9240_attach_adapter,
|
||||
/* detach_client */ &adm9240_detach_client,
|
||||
/* command */ &adm9240_command,
|
||||
@ -501,12 +501,12 @@ void adm9240_dec_use (struct i2c_client *client)
|
||||
|
||||
int adm9240_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
return 0xFF & smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
return 0xFF & i2c_smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
}
|
||||
|
||||
int adm9240_write_value(struct i2c_client *client, u8 reg, u8 value)
|
||||
{
|
||||
return smbus_write_byte_data(client->adapter, client->addr, reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value);
|
||||
}
|
||||
|
||||
/* Called when we have found a new ADM9240. It should set limits, etc. */
|
||||
|
@ -107,7 +107,7 @@ static void bt869_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver bt869_driver = {
|
||||
/* name */ "BT869 video-output chip driver",
|
||||
/* id */ I2C_DRIVERID_BT869,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &bt869_attach_adapter,
|
||||
/* detach_client */ &bt869_detach_client,
|
||||
/* command */ &bt869_command,
|
||||
@ -191,9 +191,9 @@ printk("bt869.o: probing address %d .\n",address);
|
||||
new_client->driver = &bt869_driver;
|
||||
|
||||
/* Now, we do the remaining detection. It is lousy. */
|
||||
smbus_write_byte_data(new_client->adapter,
|
||||
i2c_smbus_write_byte_data(new_client->adapter,
|
||||
new_client->addr,0xC4,0); /* set status bank 0 */
|
||||
cur = smbus_read_byte(adapter,address);
|
||||
cur = i2c_smbus_read_byte(adapter,address);
|
||||
printk("bt869.o: address 0x%X testing-->0x%X\n",address,cur);
|
||||
if ((cur | 0x20) != 0x22)
|
||||
goto ERROR1;
|
||||
@ -313,7 +313,7 @@ void bt869_dec_use (struct i2c_client *client)
|
||||
the usual practice. */
|
||||
int bt869_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
return smbus_read_byte(client->adapter,client->addr);
|
||||
return i2c_smbus_read_byte(client->adapter,client->addr);
|
||||
}
|
||||
|
||||
/* All registers are byte-sized.
|
||||
@ -321,7 +321,7 @@ int bt869_read_value(struct i2c_client *client, u8 reg)
|
||||
the usual practice. */
|
||||
int bt869_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
}
|
||||
|
||||
void bt869_init_client(struct i2c_client *client)
|
||||
|
@ -99,7 +99,7 @@ static void eeprom_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver eeprom_driver = {
|
||||
/* name */ "EEPROM READER",
|
||||
/* id */ I2C_DRIVERID_EEPROM,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &eeprom_attach_adapter,
|
||||
/* detach_client */ &eeprom_detach_client,
|
||||
/* command */ &eeprom_command,
|
||||
@ -188,9 +188,9 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
if (checksum) {
|
||||
cs = 0;
|
||||
for (i = 0; i <= 0x3e; i++)
|
||||
cs += smbus_read_byte_data(adapter,address,i);
|
||||
cs += i2c_smbus_read_byte_data(adapter,address,i);
|
||||
cs &= 0xff;
|
||||
if (smbus_read_byte_data(adapter,address,EEPROM_REG_CHECKSUM) != cs)
|
||||
if (i2c_smbus_read_byte_data(adapter,address,EEPROM_REG_CHECKSUM) != cs)
|
||||
goto ERROR1;
|
||||
}
|
||||
|
||||
@ -307,9 +307,9 @@ void eeprom_dec_use (struct i2c_client *client)
|
||||
int eeprom_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
if (reg == EEPROM_REG_CONF)
|
||||
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
else
|
||||
return smbus_write_word_data(client->adapter,client->addr,reg,value); */
|
||||
return i2c_smbus_write_word_data(client->adapter,client->addr,reg,value); */
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -329,13 +329,13 @@ void eeprom_update_client(struct i2c_client *client)
|
||||
printk("Starting eeprom update\n");
|
||||
#endif
|
||||
|
||||
if (smbus_write_byte(client->adapter,client->addr,0)) {
|
||||
if (i2c_smbus_write_byte(client->adapter,client->addr,0)) {
|
||||
#ifdef DEBUG
|
||||
printk("eeprom read start has failed!\n");
|
||||
#endif
|
||||
}
|
||||
for (i=0;i<EEPROM_SIZE;i++) {
|
||||
data->data[i] = (u8)smbus_read_byte(client->adapter,client->addr);
|
||||
data->data[i] = (u8)i2c_smbus_read_byte(client->adapter,client->addr);
|
||||
}
|
||||
|
||||
data->last_updated = jiffies;
|
||||
|
@ -211,7 +211,7 @@ static void gl518_iterate(struct i2c_client *client, int operation,
|
||||
static struct i2c_driver gl518_driver = {
|
||||
/* name */ "GL518SM sensor chip driver",
|
||||
/* id */ I2C_DRIVERID_GL518,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &gl518_attach_adapter,
|
||||
/* detach_client */ &gl518_detach_client,
|
||||
/* command */ &gl518_command,
|
||||
@ -496,9 +496,9 @@ u16 swap_bytes(u16 val)
|
||||
int gl518_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
if ((reg >= 0x07) && (reg <= 0x0c))
|
||||
return swap_bytes(smbus_read_word_data(client->adapter,client->addr,reg));
|
||||
return swap_bytes(i2c_smbus_read_word_data(client->adapter,client->addr,reg));
|
||||
else
|
||||
return smbus_read_byte_data(client->adapter,client->addr,reg);
|
||||
return i2c_smbus_read_byte_data(client->adapter,client->addr,reg);
|
||||
}
|
||||
|
||||
/* Registers 0x07 to 0x0c are word-sized, others are byte-sized
|
||||
@ -507,10 +507,10 @@ int gl518_read_value(struct i2c_client *client, u8 reg)
|
||||
int gl518_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
if ((reg >= 0x07) && (reg <= 0x0c))
|
||||
return smbus_write_word_data(client->adapter,client->addr,reg,
|
||||
return i2c_smbus_write_word_data(client->adapter,client->addr,reg,
|
||||
swap_bytes(value));
|
||||
else
|
||||
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
}
|
||||
|
||||
void gl518_update_client(struct i2c_client *client)
|
||||
|
@ -81,7 +81,7 @@ static void icspll_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver icspll_driver = {
|
||||
/* name */ "ICS/PLL clock reader",
|
||||
/* id */ I2C_DRIVERID_ICSPLL,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &icspll_attach_adapter,
|
||||
/* detach_client */ &icspll_detach_client,
|
||||
/* command */ &icspll_command,
|
||||
@ -137,7 +137,7 @@ int icspll_attach_adapter(struct i2c_adapter *adapter)
|
||||
adapter, and check whether they are used here */
|
||||
|
||||
/* these chips only support block transfers so use that for detection */
|
||||
if(smbus_read_block_data(adapter, address, 0x00, tempdata) < 0) {
|
||||
if(i2c_smbus_read_block_data(adapter, address, 0x00, tempdata) < 0) {
|
||||
#ifdef DEBUG
|
||||
printk("icspll.o: No icspll found at: 0x%X\n",address);
|
||||
#endif
|
||||
@ -254,7 +254,7 @@ void icspll_dec_use (struct i2c_client *client)
|
||||
/* No writes yet (PAE) */
|
||||
int icspll_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
return smbus_write_block_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_block_data(client->adapter,client->addr,reg,value);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -268,7 +268,7 @@ void icspll_update_client(struct i2c_client *client)
|
||||
if ((jiffies - data->last_updated > HZ+HZ/2 ) ||
|
||||
(jiffies < data->last_updated) || ! data->valid) {
|
||||
|
||||
len = smbus_read_block_data(client->adapter, client->addr, 0x00, tempdata);
|
||||
len = i2c_smbus_read_block_data(client->adapter, client->addr, 0x00, tempdata);
|
||||
#ifdef DEBUG
|
||||
printk("icspll.o: read returned %d values\n", len);
|
||||
#endif
|
||||
|
@ -92,7 +92,7 @@ static void lm75_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver lm75_driver = {
|
||||
/* name */ "LM75 sensor chip driver",
|
||||
/* id */ I2C_DRIVERID_LM75,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &lm75_attach_adapter,
|
||||
/* detach_client */ &lm75_detach_client,
|
||||
/* command */ &lm75_command,
|
||||
@ -164,14 +164,14 @@ int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
new_client->driver = &lm75_driver;
|
||||
|
||||
/* Now, we do the remaining detection. It is lousy. */
|
||||
cur = smbus_read_word_data(adapter,address,0);
|
||||
conf = smbus_read_byte_data(adapter,address,1);
|
||||
hyst = smbus_read_word_data(adapter,address,2);
|
||||
os = smbus_read_word_data(adapter,address,3);
|
||||
cur = i2c_smbus_read_word_data(adapter,address,0);
|
||||
conf = i2c_smbus_read_byte_data(adapter,address,1);
|
||||
hyst = i2c_smbus_read_word_data(adapter,address,2);
|
||||
os = i2c_smbus_read_word_data(adapter,address,3);
|
||||
for (i = 0; i <= 0x1f; i++)
|
||||
if ((smbus_read_byte_data(adapter,address,i*8+1) != conf) ||
|
||||
(smbus_read_word_data(adapter,address,i*8+2) != hyst) ||
|
||||
(smbus_read_word_data(adapter,address,i*8+3) != os))
|
||||
if ((i2c_smbus_read_byte_data(adapter,address,i*8+1) != conf) ||
|
||||
(i2c_smbus_read_word_data(adapter,address,i*8+2) != hyst) ||
|
||||
(i2c_smbus_read_word_data(adapter,address,i*8+3) != os))
|
||||
goto ERROR1;
|
||||
|
||||
/* Determine the chip type - only one kind supported! */
|
||||
@ -296,9 +296,9 @@ u16 swap_bytes(u16 val)
|
||||
int lm75_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
if (reg == LM75_REG_CONF)
|
||||
return smbus_read_byte_data(client->adapter,client->addr,reg);
|
||||
return i2c_smbus_read_byte_data(client->adapter,client->addr,reg);
|
||||
else
|
||||
return swap_bytes(smbus_read_word_data(client->adapter,client->addr,reg));
|
||||
return swap_bytes(i2c_smbus_read_word_data(client->adapter,client->addr,reg));
|
||||
}
|
||||
|
||||
/* All registers are word-sized, except for the configuration register.
|
||||
@ -307,9 +307,9 @@ int lm75_read_value(struct i2c_client *client, u8 reg)
|
||||
int lm75_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
if (reg == LM75_REG_CONF)
|
||||
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
else
|
||||
return smbus_write_word_data(client->adapter,client->addr,reg,
|
||||
return i2c_smbus_write_word_data(client->adapter,client->addr,reg,
|
||||
swap_bytes(value));
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ static struct i2c_client *lm78_list[MAX_LM78_NR];
|
||||
static struct i2c_driver lm78_driver = {
|
||||
/* name */ "LM78(-J) and LM79 sensor driver",
|
||||
/* id */ I2C_DRIVERID_LM78,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &lm78_attach_adapter,
|
||||
/* detach_client */ &lm78_detach_client,
|
||||
/* command */ &lm78_command,
|
||||
@ -533,7 +533,7 @@ int lm78_read_value(struct i2c_client *client, u8 reg)
|
||||
up( & (((struct lm78_data *) (client->data)) -> lock));
|
||||
return res;
|
||||
} else
|
||||
return smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
return i2c_smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
}
|
||||
|
||||
/* The SMBus locks itself, but ISA access muse be locked explicitely!
|
||||
@ -552,7 +552,7 @@ int lm78_write_value(struct i2c_client *client, u8 reg, u8 value)
|
||||
up(&(((struct lm78_data *) (client->data)) -> lock));
|
||||
return 0;
|
||||
} else
|
||||
return smbus_write_byte_data(client->adapter, client->addr, reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value);
|
||||
}
|
||||
|
||||
/* Called when we have found a new LM78. It should set limits, etc. */
|
||||
|
@ -229,7 +229,7 @@ static struct i2c_client *lm80_list[MAX_LM80_NR];
|
||||
static struct i2c_driver lm80_driver = {
|
||||
/* name */ "LM80 sensor driver",
|
||||
/* id */ I2C_DRIVERID_LM80,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &lm80_attach_adapter,
|
||||
/* detach_client */ &lm80_detach_client,
|
||||
/* command */ &lm80_command,
|
||||
@ -319,10 +319,10 @@ int lm80_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
if (lm80_read_value(new_client,LM80_REG_ALARM2) & 0xc0)
|
||||
goto ERROR1;
|
||||
for (i = 0x2a; i <= 0x3d; i++) {
|
||||
cur = smbus_read_byte_data(adapter,address,i);
|
||||
if ((smbus_read_byte_data(adapter,address,i+0x40) != cur) ||
|
||||
(smbus_read_byte_data(adapter,address,i+0x80) != cur) ||
|
||||
(smbus_read_byte_data(adapter,address,i+0xc0) != cur))
|
||||
cur = i2c_smbus_read_byte_data(adapter,address,i);
|
||||
if ((i2c_smbus_read_byte_data(adapter,address,i+0x40) != cur) ||
|
||||
(i2c_smbus_read_byte_data(adapter,address,i+0x80) != cur) ||
|
||||
(i2c_smbus_read_byte_data(adapter,address,i+0xc0) != cur))
|
||||
goto ERROR1;
|
||||
}
|
||||
|
||||
@ -436,12 +436,12 @@ void lm80_dec_use (struct i2c_client *client)
|
||||
|
||||
int lm80_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
return smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
return i2c_smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
}
|
||||
|
||||
int lm80_write_value(struct i2c_client *client, u8 reg, u8 value)
|
||||
{
|
||||
return smbus_write_byte_data(client->adapter, client->addr, reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value);
|
||||
}
|
||||
|
||||
/* Called when we have found a new LM80. It should set limits, etc. */
|
||||
|
@ -101,7 +101,7 @@ static void ltc1710_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver ltc1710_driver = {
|
||||
/* name */ "LTC1710 sensor chip driver",
|
||||
/* id */ I2C_DRIVERID_LTC1710,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ <c1710_attach_adapter,
|
||||
/* detach_client */ <c1710_detach_client,
|
||||
/* command */ <c1710_command,
|
||||
@ -301,7 +301,7 @@ void ltc1710_update_client(struct i2c_client *client)
|
||||
printk("Starting ltc1710 update\n");
|
||||
#endif
|
||||
|
||||
/* data->status = smbus_read_byte(client->adapter,client->addr);
|
||||
/* data->status = i2c_smbus_read_byte(client->adapter,client->addr);
|
||||
Unfortunately, reads always fail! */
|
||||
data->last_updated = jiffies;
|
||||
data->valid = 1;
|
||||
@ -324,7 +324,7 @@ void ltc1710_switch1(struct i2c_client *client, int operation, int ctl_name,
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
data->status = (data->status & 2) | results[0];
|
||||
smbus_write_byte(client->adapter,client->addr,data->status);
|
||||
i2c_smbus_write_byte(client->adapter,client->addr,data->status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -342,7 +342,7 @@ void ltc1710_switch2(struct i2c_client *client, int operation, int ctl_name,
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
data->status = (data->status & 1) | (results[0] << 1);
|
||||
smbus_write_byte(client->adapter,client->addr,data->status);
|
||||
i2c_smbus_write_byte(client->adapter,client->addr,data->status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ static void matorb_update_client(struct i2c_client *client);
|
||||
static struct i2c_driver matorb_driver = {
|
||||
/* name */ "Matrix Orbital LCD driver",
|
||||
/* id */ I2C_DRIVERID_MATORB,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &matorb_attach_adapter,
|
||||
/* detach_client */ &matorb_detach_client,
|
||||
/* command */ &matorb_command,
|
||||
@ -150,7 +150,7 @@ int matorb_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
new_client->driver = &matorb_driver;
|
||||
|
||||
/* Now, we do the remaining detection. It is lousy. */
|
||||
cur = smbus_write_byte_data(adapter,address,0x0FE, 0x58); /* clear screen */
|
||||
cur = i2c_smbus_write_byte_data(adapter,address,0x0FE, 0x58); /* clear screen */
|
||||
|
||||
printk("matorb.o: debug detect 0x%X\n",cur);
|
||||
|
||||
@ -266,9 +266,9 @@ int matorb_read_value(struct i2c_client *client, u8 reg)
|
||||
int matorb_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
if (reg==0) {
|
||||
return smbus_write_byte(client->adapter,client->addr,value);
|
||||
return i2c_smbus_write_byte(client->adapter,client->addr,value);
|
||||
} else {
|
||||
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ static struct i2c_client *maxi_list[MAX_MAXI_NR];
|
||||
static struct i2c_driver maxi_driver = {
|
||||
/* name */ "HP MaxiLife driver",
|
||||
/* id */ I2C_DRIVERID_MAXILIFE,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &maxi_attach_adapter,
|
||||
/* detach_client */ &maxi_detach_client,
|
||||
/* command */ &maxi_command,
|
||||
@ -284,7 +284,7 @@ int maxi_detect_smbus(struct i2c_adapter *adapter)
|
||||
/* Later on, we will keep a list of registered addresses for each
|
||||
adapter, and check whether they are used here */
|
||||
|
||||
if (smbus_read_byte_data(adapter, address, MAXI_REG_LED_STATE) < 0)
|
||||
if (i2c_smbus_read_byte_data(adapter, address, MAXI_REG_LED_STATE) < 0)
|
||||
continue;
|
||||
|
||||
#ifdef AUTODETECT
|
||||
@ -294,10 +294,10 @@ int maxi_detect_smbus(struct i2c_adapter *adapter)
|
||||
"CG 00.04" -> Cristal [XU] / Geronimo [XAs]
|
||||
"CO 00.03" -> Cognac [XU]
|
||||
"AS 00.01" -> Ashaki [XA] */
|
||||
biosctl = smbus_read_byte_data(adapter, address, MAXI_REG_BIOS_CTRL);
|
||||
smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl|4);
|
||||
biosctl = i2c_smbus_read_byte_data(adapter, address, MAXI_REG_BIOS_CTRL);
|
||||
i2c_smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl|4);
|
||||
err = eeprom_read_byte_data(adapter, 0x54, 0x45);
|
||||
smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl);
|
||||
i2c_smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl);
|
||||
#endif
|
||||
|
||||
if (maxi_version == cristal) {
|
||||
@ -454,14 +454,14 @@ void maxi_dec_use (struct i2c_client *client)
|
||||
/* Read byte from specified register. */
|
||||
int maxi_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
return smbus_read_byte_data(client->adapter, client->addr, reg);
|
||||
return i2c_smbus_read_byte_data(client->adapter, client->addr, reg);
|
||||
}
|
||||
|
||||
#ifndef NOWRITE
|
||||
/* Write byte to specified register. */
|
||||
int maxi_write_value(struct i2c_client *client, u8 reg, u8 value)
|
||||
{
|
||||
return smbus_write_byte_data(client->adapter, client->addr, reg, value);
|
||||
return i2c_smbus_write_byte_data(client->adapter, client->addr, reg, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -215,7 +215,7 @@ static struct i2c_client *sis5595_list[MAX_SIS5595_NR];
|
||||
static struct i2c_driver sis5595_driver = {
|
||||
/* name */ "SiS 5595",
|
||||
/* id */ I2C_DRIVERID_SIS5595,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &sis5595_attach_adapter,
|
||||
/* detach_client */ &sis5595_detach_client,
|
||||
/* command */ &sis5595_command,
|
||||
|
@ -402,7 +402,7 @@ static struct i2c_client *w83781d_list[MAX_W83781D_NR];
|
||||
static struct i2c_driver w83781d_driver = {
|
||||
/* name */ "W83781D sensor driver",
|
||||
/* id */ I2C_DRIVERID_W83781D,
|
||||
/* flags */ DF_NOTIFY,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &w83781d_attach_adapter,
|
||||
/* detach_client */ &w83781d_detach_client,
|
||||
/* command */ &w83781d_command,
|
||||
@ -903,14 +903,14 @@ int w83781d_read_value(struct i2c_client *client, u16 reg)
|
||||
}
|
||||
} else {
|
||||
if (reg & 0xff00)
|
||||
smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,
|
||||
reg >> 8);
|
||||
res = smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
res = i2c_smbus_read_byte_data(client->adapter,client->addr, reg);
|
||||
if (word_sized)
|
||||
res = (res << 8) + smbus_read_byte_data(client->adapter,client->addr,
|
||||
res = (res << 8) + i2c_smbus_read_byte_data(client->adapter,client->addr,
|
||||
reg);
|
||||
if (reg & 0xff00)
|
||||
smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0);
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0);
|
||||
}
|
||||
up( & (((struct w83781d_data *) (client->data)) -> lock));
|
||||
return res;
|
||||
@ -956,15 +956,15 @@ int w83781d_write_value(struct i2c_client *client, u16 reg, u16 value)
|
||||
}
|
||||
} else {
|
||||
if (reg & 0xff00)
|
||||
smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,
|
||||
reg >> 8);
|
||||
if (word_sized) {
|
||||
smbus_write_byte_data(client->adapter,client->addr, reg, value >> 8);
|
||||
smbus_write_byte_data(client->adapter,client->addr, reg+1, value &0xff);
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr, reg, value >> 8);
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr, reg+1, value &0xff);
|
||||
} else
|
||||
smbus_write_byte_data(client->adapter,client->addr, reg, value &0xff);
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr, reg, value &0xff);
|
||||
if (reg & 0xff00)
|
||||
smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0);
|
||||
i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0);
|
||||
}
|
||||
up( & (((struct w83781d_data *) (client->data)) -> lock));
|
||||
return 0;
|
||||
|
@ -737,7 +737,7 @@ int sensors_detect(struct i2c_adapter *adapter,
|
||||
|
||||
/* OK, so we really should examine this address. First check
|
||||
whether there is some client here at all! */
|
||||
if (is_isa || (smbus_read_byte(adapter,addr) >= 0))
|
||||
if (is_isa || (i2c_smbus_read_byte(adapter,addr) >= 0))
|
||||
if ((err = found_proc(adapter,addr,-1)))
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user