Changeset 4245
- Timestamp:
- 11/27/06 21:17:55 (7 years ago)
- Location:
- i2c/trunk
- Files:
-
- 5 modified
-
doc/summary (modified) (1 diff)
-
kernel/i2c-core.c (modified) (5 diffs)
-
kernel/i2c-elektor.c (modified) (1 diff)
-
kernel/i2c-id.h (modified) (3 diffs)
-
kernel/i2c.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c/trunk/doc/summary
r4158 r4245 38 38 a separate Adapter and Algorithm driver), and drivers for your I2C devices 39 39 (usually one driver for each device). There are no I2C device drivers 40 in this package. See the lm_sensors project http://www.lm-sensors.org 40 in this package. See the lm_sensors project http://www.lm-sensors.org/ 41 41 for device drivers. 42 42 -
i2c/trunk/kernel/i2c-core.c
r4189 r4245 315 315 if (adapter->clients[i] && (adapter->clients[i]->addr == addr)) 316 316 return -EBUSY; 317 318 317 return 0; 319 318 } … … 489 488 if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE) 490 489 client->usage_count++; 491 else if (client->usage_count > 0) 490 else if (client->usage_count > 0) 492 491 return -EBUSY; 493 else 492 else 494 493 client->usage_count++; 495 494 } … … 685 684 */ 686 685 687 int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg msgs[],int num)686 int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs,int num) 688 687 { 689 688 int ret; … … 1347 1346 1348 1347 1349 s32 i2c_smbus_xfer(struct i2c_adapter * adap , u16 addr, unsigned short flags,1348 s32 i2c_smbus_xfer(struct i2c_adapter * adapter, u16 addr, unsigned short flags, 1350 1349 char read_write, u8 command, int size, 1351 1350 union i2c_smbus_data * data) … … 1355 1354 flags &= I2C_M_TEN | I2C_CLIENT_PEC; 1356 1355 1357 if (adap ->algo->smbus_xfer) {1358 down(&adap ->bus);1359 res = adap ->algo->smbus_xfer(adap,addr,flags,read_write,1356 if (adapter->algo->smbus_xfer) { 1357 down(&adapter->bus); 1358 res = adapter->algo->smbus_xfer(adapter,addr,flags,read_write, 1360 1359 command,size,data); 1361 up(&adap ->bus);1360 up(&adapter->bus); 1362 1361 } else 1363 res = i2c_smbus_xfer_emulated(adap ,addr,flags,read_write,1362 res = i2c_smbus_xfer_emulated(adapter,addr,flags,read_write, 1364 1363 command,size,data); 1365 1364 -
i2c/trunk/kernel/i2c-elektor.c
r3935 r4245 186 186 */ 187 187 static struct i2c_algo_pcf_data pcf_isa_data = { 188 .setpcf = pcf_isa_setbyte,189 .getpcf = pcf_isa_getbyte,190 .getown = pcf_isa_getown,191 .getclock = pcf_isa_getclock,192 .waitforpin = pcf_isa_waitforpin,193 .udelay = 10,194 .mdelay = 10,195 .timeout = HZ,188 .setpcf = pcf_isa_setbyte, 189 .getpcf = pcf_isa_getbyte, 190 .getown = pcf_isa_getown, 191 .getclock = pcf_isa_getclock, 192 .waitforpin = pcf_isa_waitforpin, 193 .udelay = 10, 194 .mdelay = 10, 195 .timeout = HZ, 196 196 }; 197 197 -
i2c/trunk/kernel/i2c-id.h
r4020 r4245 101 101 #define I2C_DRIVERID_UDA1342 53 /* UDA1342 audio codec */ 102 102 #define I2C_DRIVERID_ADV7170 54 /* video encoder */ 103 #define I2C_DRIVERID_RADEON 55 /* I2C bus on Radeon boards */104 103 #define I2C_DRIVERID_MAX1617 56 /* temp sensor */ 105 #define I2C_DRIVERID_SAA7191 57 /* video encoder */104 #define I2C_DRIVERID_SAA7191 57 /* video decoder */ 106 105 #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ 107 106 #define I2C_DRIVERID_BT832 59 /* CMOS camera video processor */ … … 111 110 #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ 112 111 #define I2C_DRIVERID_SAA7114H 64 /* video decoder */ 113 114 112 115 113 #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ … … 203 201 #define I2C_ALGO_IOP3XX 0x140000 /* XSCALE IOP3XX On-chip I2C alg */ 204 202 #define I2C_ALGO_SIBYTE 0x150000 /* Broadcom SiByte SOCs */ 205 #define I2C_ALGO_SGI 0x160000 /* SGI algorithm */203 #define I2C_ALGO_SGI 0x160000 /* SGI algorithm */ 206 204 #define I2C_ALGO_USB 0x170000 /* USB algorithm */ 207 205 #define I2C_ALGO_VIRT 0x180000 /* Virtual bus adapter */ -
i2c/trunk/kernel/i2c.h
r4191 r4245 60 60 union i2c_smbus_data; 61 61 62 62 63 /* 63 64 * The master routines are the ones normally used to transmit data to devices … … 71 72 /* Transfer num messages. 72 73 */ 73 extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);74 extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg,int num); 74 75 75 76 … … 143 144 int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); 144 145 145 /* These two are used for bookkeeping & dynamic unloading of 146 /* These two are used for bookkeeping & dynamic unloading of 146 147 * kernel modules. inc_use tells the driver that a client is being 147 148 * used by another module & that it should increase its ref. counter. … … 196 197 smbus_xfer. If set to NULL, the SMBus protocol is simulated 197 198 using common I2C messages */ 198 int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],199 int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, 199 200 int num); 200 201 int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
