Changeset 499
- Timestamp:
- 07/21/99 00:46:49 (14 years ago)
- Location:
- lm-sensors/trunk/kernel
- Files:
-
- 15 modified
-
chips/adm1021.c (modified) (2 diffs)
-
chips/adm9240.c (modified) (2 diffs)
-
chips/bt869.c (modified) (4 diffs)
-
chips/eeprom.c (modified) (5 diffs)
-
chips/gl518sm.c (modified) (3 diffs)
-
chips/icspll.c (modified) (4 diffs)
-
chips/lm75.c (modified) (4 diffs)
-
chips/lm78.c (modified) (3 diffs)
-
chips/lm80.c (modified) (3 diffs)
-
chips/ltc1710.c (modified) (4 diffs)
-
chips/matorb.c (modified) (3 diffs)
-
chips/maxilife.c (modified) (5 diffs)
-
chips/sis5595.c (modified) (1 diff)
-
chips/w83781d.c (modified) (3 diffs)
-
sensors.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/chips/adm1021.c
r496 r499 129 129 /* name */ "adm1021, MAX1617 sensor driver", 130 130 /* id */ I2C_DRIVERID_ADM1021, 131 /* flags */ DF_NOTIFY,131 /* flags */ I2C_DF_NOTIFY, 132 132 /* attach_adapter */ &adm1021_attach_adapter, 133 133 /* detach_client */ &adm1021_detach_client, … … 374 374 int adm1021_read_value(struct i2c_client *client, u8 reg) 375 375 { 376 return smbus_read_byte_data(client->adapter,client->addr,reg);376 return i2c_smbus_read_byte_data(client->adapter,client->addr,reg); 377 377 } 378 378 379 379 int adm1021_write_value(struct i2c_client *client, u8 reg, u16 value) 380 380 { 381 return smbus_write_byte_data(client->adapter,client->addr,reg,value);381 return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 382 382 } 383 383 -
lm-sensors/trunk/kernel/chips/adm9240.c
r496 r499 277 277 /* name */ "ADM9240 sensor driver", 278 278 /* id */ I2C_DRIVERID_ADM9240, 279 /* flags */ DF_NOTIFY,279 /* flags */ I2C_DF_NOTIFY, 280 280 /* attach_adapter */ &adm9240_attach_adapter, 281 281 /* detach_client */ &adm9240_detach_client, … … 502 502 int adm9240_read_value(struct i2c_client *client, u8 reg) 503 503 { 504 return 0xFF & smbus_read_byte_data(client->adapter,client->addr, reg);504 return 0xFF & i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 505 505 } 506 506 507 507 int adm9240_write_value(struct i2c_client *client, u8 reg, u8 value) 508 508 { 509 return smbus_write_byte_data(client->adapter, client->addr, reg,value);509 return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value); 510 510 } 511 511 -
lm-sensors/trunk/kernel/chips/bt869.c
r496 r499 108 108 /* name */ "BT869 video-output chip driver", 109 109 /* id */ I2C_DRIVERID_BT869, 110 /* flags */ DF_NOTIFY,110 /* flags */ I2C_DF_NOTIFY, 111 111 /* attach_adapter */ &bt869_attach_adapter, 112 112 /* detach_client */ &bt869_detach_client, … … 192 192 193 193 /* Now, we do the remaining detection. It is lousy. */ 194 smbus_write_byte_data(new_client->adapter,194 i2c_smbus_write_byte_data(new_client->adapter, 195 195 new_client->addr,0xC4,0); /* set status bank 0 */ 196 cur = smbus_read_byte(adapter,address);196 cur = i2c_smbus_read_byte(adapter,address); 197 197 printk("bt869.o: address 0x%X testing-->0x%X\n",address,cur); 198 198 if ((cur | 0x20) != 0x22) … … 314 314 int bt869_read_value(struct i2c_client *client, u8 reg) 315 315 { 316 return smbus_read_byte(client->adapter,client->addr);316 return i2c_smbus_read_byte(client->adapter,client->addr); 317 317 } 318 318 … … 322 322 int bt869_write_value(struct i2c_client *client, u8 reg, u16 value) 323 323 { 324 return smbus_write_byte_data(client->adapter,client->addr,reg,value);324 return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 325 325 } 326 326 -
lm-sensors/trunk/kernel/chips/eeprom.c
r496 r499 100 100 /* name */ "EEPROM READER", 101 101 /* id */ I2C_DRIVERID_EEPROM, 102 /* flags */ DF_NOTIFY,102 /* flags */ I2C_DF_NOTIFY, 103 103 /* attach_adapter */ &eeprom_attach_adapter, 104 104 /* detach_client */ &eeprom_detach_client, … … 189 189 cs = 0; 190 190 for (i = 0; i <= 0x3e; i++) 191 cs += smbus_read_byte_data(adapter,address,i);191 cs += i2c_smbus_read_byte_data(adapter,address,i); 192 192 cs &= 0xff; 193 if ( smbus_read_byte_data(adapter,address,EEPROM_REG_CHECKSUM) != cs)193 if (i2c_smbus_read_byte_data(adapter,address,EEPROM_REG_CHECKSUM) != cs) 194 194 goto ERROR1; 195 195 } … … 308 308 { 309 309 if (reg == EEPROM_REG_CONF) 310 return smbus_write_byte_data(client->adapter,client->addr,reg,value);310 return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 311 311 else 312 return smbus_write_word_data(client->adapter,client->addr,reg,value); */312 return i2c_smbus_write_word_data(client->adapter,client->addr,reg,value); */ 313 313 314 314 return 0; … … 330 330 #endif 331 331 332 if ( smbus_write_byte(client->adapter,client->addr,0)) {332 if (i2c_smbus_write_byte(client->adapter,client->addr,0)) { 333 333 #ifdef DEBUG 334 334 printk("eeprom read start has failed!\n"); … … 336 336 } 337 337 for (i=0;i<EEPROM_SIZE;i++) { 338 data->data[i] = (u8) smbus_read_byte(client->adapter,client->addr);338 data->data[i] = (u8)i2c_smbus_read_byte(client->adapter,client->addr); 339 339 } 340 340 -
lm-sensors/trunk/kernel/chips/gl518sm.c
r496 r499 212 212 /* name */ "GL518SM sensor chip driver", 213 213 /* id */ I2C_DRIVERID_GL518, 214 /* flags */ DF_NOTIFY,214 /* flags */ I2C_DF_NOTIFY, 215 215 /* attach_adapter */ &gl518_attach_adapter, 216 216 /* detach_client */ &gl518_detach_client, … … 497 497 { 498 498 if ((reg >= 0x07) && (reg <= 0x0c)) 499 return swap_bytes( smbus_read_word_data(client->adapter,client->addr,reg));499 return swap_bytes(i2c_smbus_read_word_data(client->adapter,client->addr,reg)); 500 500 else 501 return smbus_read_byte_data(client->adapter,client->addr,reg);501 return i2c_smbus_read_byte_data(client->adapter,client->addr,reg); 502 502 } 503 503 … … 508 508 { 509 509 if ((reg >= 0x07) && (reg <= 0x0c)) 510 return smbus_write_word_data(client->adapter,client->addr,reg,510 return i2c_smbus_write_word_data(client->adapter,client->addr,reg, 511 511 swap_bytes(value)); 512 512 else 513 return smbus_write_byte_data(client->adapter,client->addr,reg,value);513 return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 514 514 } 515 515 -
lm-sensors/trunk/kernel/chips/icspll.c
r496 r499 82 82 /* name */ "ICS/PLL clock reader", 83 83 /* id */ I2C_DRIVERID_ICSPLL, 84 /* flags */ DF_NOTIFY,84 /* flags */ I2C_DF_NOTIFY, 85 85 /* attach_adapter */ &icspll_attach_adapter, 86 86 /* detach_client */ &icspll_detach_client, … … 138 138 139 139 /* these chips only support block transfers so use that for detection */ 140 if( smbus_read_block_data(adapter, address, 0x00, tempdata) < 0) {140 if(i2c_smbus_read_block_data(adapter, address, 0x00, tempdata) < 0) { 141 141 #ifdef DEBUG 142 142 printk("icspll.o: No icspll found at: 0x%X\n",address); … … 255 255 int icspll_write_value(struct i2c_client *client, u8 reg, u16 value) 256 256 { 257 return smbus_write_block_data(client->adapter,client->addr,reg,value);257 return i2c_smbus_write_block_data(client->adapter,client->addr,reg,value); 258 258 } 259 259 #endif … … 269 269 (jiffies < data->last_updated) || ! data->valid) { 270 270 271 len = smbus_read_block_data(client->adapter, client->addr, 0x00, tempdata);271 len = i2c_smbus_read_block_data(client->adapter, client->addr, 0x00, tempdata); 272 272 #ifdef DEBUG 273 273 printk("icspll.o: read returned %d values\n", len); -
lm-sensors/trunk/kernel/chips/lm75.c
r496 r499 93 93 /* name */ "LM75 sensor chip driver", 94 94 /* id */ I2C_DRIVERID_LM75, 95 /* flags */ DF_NOTIFY,95 /* flags */ I2C_DF_NOTIFY, 96 96 /* attach_adapter */ &lm75_attach_adapter, 97 97 /* detach_client */ &lm75_detach_client, … … 165 165 166 166 /* Now, we do the remaining detection. It is lousy. */ 167 cur = smbus_read_word_data(adapter,address,0);168 conf = smbus_read_byte_data(adapter,address,1);169 hyst = smbus_read_word_data(adapter,address,2);170 os = smbus_read_word_data(adapter,address,3);167 cur = i2c_smbus_read_word_data(adapter,address,0); 168 conf = i2c_smbus_read_byte_data(adapter,address,1); 169 hyst = i2c_smbus_read_word_data(adapter,address,2); 170 os = i2c_smbus_read_word_data(adapter,address,3); 171 171 for (i = 0; i <= 0x1f; i++) 172 if (( smbus_read_byte_data(adapter,address,i*8+1) != conf) ||173 ( smbus_read_word_data(adapter,address,i*8+2) != hyst) ||174 ( smbus_read_word_data(adapter,address,i*8+3) != os))172 if ((i2c_smbus_read_byte_data(adapter,address,i*8+1) != conf) || 173 (i2c_smbus_read_word_data(adapter,address,i*8+2) != hyst) || 174 (i2c_smbus_read_word_data(adapter,address,i*8+3) != os)) 175 175 goto ERROR1; 176 176 … … 297 297 { 298 298 if (reg == LM75_REG_CONF) 299 return smbus_read_byte_data(client->adapter,client->addr,reg);299 return i2c_smbus_read_byte_data(client->adapter,client->addr,reg); 300 300 else 301 return swap_bytes( smbus_read_word_data(client->adapter,client->addr,reg));301 return swap_bytes(i2c_smbus_read_word_data(client->adapter,client->addr,reg)); 302 302 } 303 303 … … 308 308 { 309 309 if (reg == LM75_REG_CONF) 310 return smbus_write_byte_data(client->adapter,client->addr,reg,value);310 return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 311 311 else 312 return smbus_write_word_data(client->adapter,client->addr,reg,312 return i2c_smbus_write_word_data(client->adapter,client->addr,reg, 313 313 swap_bytes(value)); 314 314 } -
lm-sensors/trunk/kernel/chips/lm78.c
r496 r499 237 237 /* name */ "LM78(-J) and LM79 sensor driver", 238 238 /* id */ I2C_DRIVERID_LM78, 239 /* flags */ DF_NOTIFY,239 /* flags */ I2C_DF_NOTIFY, 240 240 /* attach_adapter */ &lm78_attach_adapter, 241 241 /* detach_client */ &lm78_detach_client, … … 534 534 return res; 535 535 } else 536 return smbus_read_byte_data(client->adapter,client->addr, reg);536 return i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 537 537 } 538 538 … … 553 553 return 0; 554 554 } else 555 return smbus_write_byte_data(client->adapter, client->addr, reg,value);555 return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value); 556 556 } 557 557 -
lm-sensors/trunk/kernel/chips/lm80.c
r496 r499 230 230 /* name */ "LM80 sensor driver", 231 231 /* id */ I2C_DRIVERID_LM80, 232 /* flags */ DF_NOTIFY,232 /* flags */ I2C_DF_NOTIFY, 233 233 /* attach_adapter */ &lm80_attach_adapter, 234 234 /* detach_client */ &lm80_detach_client, … … 320 320 goto ERROR1; 321 321 for (i = 0x2a; i <= 0x3d; i++) { 322 cur = smbus_read_byte_data(adapter,address,i);323 if (( smbus_read_byte_data(adapter,address,i+0x40) != cur) ||324 ( smbus_read_byte_data(adapter,address,i+0x80) != cur) ||325 ( smbus_read_byte_data(adapter,address,i+0xc0) != cur))322 cur = i2c_smbus_read_byte_data(adapter,address,i); 323 if ((i2c_smbus_read_byte_data(adapter,address,i+0x40) != cur) || 324 (i2c_smbus_read_byte_data(adapter,address,i+0x80) != cur) || 325 (i2c_smbus_read_byte_data(adapter,address,i+0xc0) != cur)) 326 326 goto ERROR1; 327 327 } … … 437 437 int lm80_read_value(struct i2c_client *client, u8 reg) 438 438 { 439 return smbus_read_byte_data(client->adapter,client->addr, reg);439 return i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 440 440 } 441 441 442 442 int lm80_write_value(struct i2c_client *client, u8 reg, u8 value) 443 443 { 444 return smbus_write_byte_data(client->adapter, client->addr, reg,value);444 return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value); 445 445 } 446 446 -
lm-sensors/trunk/kernel/chips/ltc1710.c
r496 r499 102 102 /* name */ "LTC1710 sensor chip driver", 103 103 /* id */ I2C_DRIVERID_LTC1710, 104 /* flags */ DF_NOTIFY,104 /* flags */ I2C_DF_NOTIFY, 105 105 /* attach_adapter */ <c1710_attach_adapter, 106 106 /* detach_client */ <c1710_detach_client, … … 302 302 #endif 303 303 304 /* data->status = smbus_read_byte(client->adapter,client->addr);304 /* data->status = i2c_smbus_read_byte(client->adapter,client->addr); 305 305 Unfortunately, reads always fail! */ 306 306 data->last_updated = jiffies; … … 325 325 if (*nrels_mag >= 1) { 326 326 data->status = (data->status & 2) | results[0]; 327 smbus_write_byte(client->adapter,client->addr,data->status);327 i2c_smbus_write_byte(client->adapter,client->addr,data->status); 328 328 } 329 329 } … … 343 343 if (*nrels_mag >= 1) { 344 344 data->status = (data->status & 1) | (results[0] << 1); 345 smbus_write_byte(client->adapter,client->addr,data->status);345 i2c_smbus_write_byte(client->adapter,client->addr,data->status); 346 346 } 347 347 } -
lm-sensors/trunk/kernel/chips/matorb.c
r496 r499 78 78 /* name */ "Matrix Orbital LCD driver", 79 79 /* id */ I2C_DRIVERID_MATORB, 80 /* flags */ DF_NOTIFY,80 /* flags */ I2C_DF_NOTIFY, 81 81 /* attach_adapter */ &matorb_attach_adapter, 82 82 /* detach_client */ &matorb_detach_client, … … 151 151 152 152 /* Now, we do the remaining detection. It is lousy. */ 153 cur = smbus_write_byte_data(adapter,address,0x0FE, 0x58); /* clear screen */153 cur = i2c_smbus_write_byte_data(adapter,address,0x0FE, 0x58); /* clear screen */ 154 154 155 155 printk("matorb.o: debug detect 0x%X\n",cur); … … 267 267 { 268 268 if (reg==0) { 269 return smbus_write_byte(client->adapter,client->addr,value);269 return i2c_smbus_write_byte(client->adapter,client->addr,value); 270 270 } else { 271 return smbus_write_byte_data(client->adapter,client->addr,reg,value);271 return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 272 272 } 273 273 } -
lm-sensors/trunk/kernel/chips/maxilife.c
r496 r499 197 197 /* name */ "HP MaxiLife driver", 198 198 /* id */ I2C_DRIVERID_MAXILIFE, 199 /* flags */ DF_NOTIFY,199 /* flags */ I2C_DF_NOTIFY, 200 200 /* attach_adapter */ &maxi_attach_adapter, 201 201 /* detach_client */ &maxi_detach_client, … … 285 285 adapter, and check whether they are used here */ 286 286 287 if ( smbus_read_byte_data(adapter, address, MAXI_REG_LED_STATE) < 0)287 if (i2c_smbus_read_byte_data(adapter, address, MAXI_REG_LED_STATE) < 0) 288 288 continue; 289 289 … … 295 295 "CO 00.03" -> Cognac [XU] 296 296 "AS 00.01" -> Ashaki [XA] */ 297 biosctl = smbus_read_byte_data(adapter, address, MAXI_REG_BIOS_CTRL);298 smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl|4);297 biosctl = i2c_smbus_read_byte_data(adapter, address, MAXI_REG_BIOS_CTRL); 298 i2c_smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl|4); 299 299 err = eeprom_read_byte_data(adapter, 0x54, 0x45); 300 smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl);300 i2c_smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl); 301 301 #endif 302 302 … … 455 455 int maxi_read_value(struct i2c_client *client, u8 reg) 456 456 { 457 return smbus_read_byte_data(client->adapter, client->addr, reg);457 return i2c_smbus_read_byte_data(client->adapter, client->addr, reg); 458 458 } 459 459 … … 462 462 int maxi_write_value(struct i2c_client *client, u8 reg, u8 value) 463 463 { 464 return smbus_write_byte_data(client->adapter, client->addr, reg, value);464 return i2c_smbus_write_byte_data(client->adapter, client->addr, reg, value); 465 465 } 466 466 #endif -
lm-sensors/trunk/kernel/chips/sis5595.c
r496 r499 216 216 /* name */ "SiS 5595", 217 217 /* id */ I2C_DRIVERID_SIS5595, 218 /* flags */ DF_NOTIFY,218 /* flags */ I2C_DF_NOTIFY, 219 219 /* attach_adapter */ &sis5595_attach_adapter, 220 220 /* detach_client */ &sis5595_detach_client, -
lm-sensors/trunk/kernel/chips/w83781d.c
r496 r499 403 403 /* name */ "W83781D sensor driver", 404 404 /* id */ I2C_DRIVERID_W83781D, 405 /* flags */ DF_NOTIFY,405 /* flags */ I2C_DF_NOTIFY, 406 406 /* attach_adapter */ &w83781d_attach_adapter, 407 407 /* detach_client */ &w83781d_detach_client, … … 904 904 } else { 905 905 if (reg & 0xff00) 906 smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,906 i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK, 907 907 reg >> 8); 908 res = smbus_read_byte_data(client->adapter,client->addr, reg);908 res = i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 909 909 if (word_sized) 910 res = (res << 8) + smbus_read_byte_data(client->adapter,client->addr,910 res = (res << 8) + i2c_smbus_read_byte_data(client->adapter,client->addr, 911 911 reg); 912 912 if (reg & 0xff00) 913 smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0);913 i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0); 914 914 } 915 915 up( & (((struct w83781d_data *) (client->data)) -> lock)); … … 957 957 } else { 958 958 if (reg & 0xff00) 959 smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,959 i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK, 960 960 reg >> 8); 961 961 if (word_sized) { 962 smbus_write_byte_data(client->adapter,client->addr, reg, value >> 8);963 smbus_write_byte_data(client->adapter,client->addr, reg+1, value &0xff);962 i2c_smbus_write_byte_data(client->adapter,client->addr, reg, value >> 8); 963 i2c_smbus_write_byte_data(client->adapter,client->addr, reg+1, value &0xff); 964 964 } else 965 smbus_write_byte_data(client->adapter,client->addr, reg, value &0xff);965 i2c_smbus_write_byte_data(client->adapter,client->addr, reg, value &0xff); 966 966 if (reg & 0xff00) 967 smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0);967 i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0); 968 968 } 969 969 up( & (((struct w83781d_data *) (client->data)) -> lock)); -
lm-sensors/trunk/kernel/sensors.c
r496 r499 738 738 /* OK, so we really should examine this address. First check 739 739 whether there is some client here at all! */ 740 if (is_isa || ( smbus_read_byte(adapter,addr) >= 0))740 if (is_isa || (i2c_smbus_read_byte(adapter,addr) >= 0)) 741 741 if ((err = found_proc(adapter,addr,-1))) 742 742 return err;
