Changeset 3342
- Timestamp:
- 07/22/99 17:34:50 (9 years ago)
- Files:
-
- i2c/trunk/TODO (modified) (1 diff)
- i2c/trunk/kernel/i2c-algo-bit.c (modified) (13 diffs)
- i2c/trunk/kernel/i2c-algo-pcf.c (modified) (17 diffs)
- i2c/trunk/kernel/i2c-core.c (modified) (46 diffs)
- i2c/trunk/kernel/i2c-dev.c (modified) (5 diffs)
- i2c/trunk/kernel/i2c-elektor.c (modified) (5 diffs)
- i2c/trunk/kernel/i2c-elv.c (modified) (4 diffs)
- i2c/trunk/kernel/i2c-philips-par.c (modified) (2 diffs)
- i2c/trunk/kernel/i2c-velleman.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
i2c/trunk/TODO
r3341 r3342 4 4 variable access, especially during (de)registration activity. 5 5 * Make mkpatch remove old patched lines. Make it more robust. 6 * Make all algorithms, adapters, clients write a small line on insertion 7 and deletion, all in the same way, including the driver version. 8 Introduce version numbers for this. 6 * Use the defines in <linux/kernel.h> to classify printk commands 7 as informational, fatal, etc. Already done for some modules at some 8 places. 9 * Introduce version numbers for all modules, reported on insertion 9 10 * Check debugging levels in all modules are sane. 10 11 * Pretty-print everything as in the kernel code guidelines (found in i2c/trunk/kernel/i2c-algo-bit.c
r3332 r3342 271 271 sda=getsda(adap); 272 272 if (adap->getscl==NULL) { 273 printk("i2c (bit): Warning: Adapter can't read from clock line - skipping test.\n");273 printk("i2c-algo-bit.o: Warning: Adapter can't read from clock line - skipping test.\n"); 274 274 return 0; 275 275 } 276 276 scl=getscl(adap); 277 printk("i2c (bit): Adapter: %s scl: %d sda: %d -- testing...\n",277 printk("i2c-algo-bit.o: Adapter: %s scl: %d sda: %d -- testing...\n", 278 278 name,getscl(adap),getsda(adap)); 279 279 if (!scl || !sda ) { 280 printk("i2c (bit): %s seems to be busy.\n",name);280 printk("i2c-algo-bit.o: %s seems to be busy.\n",name); 281 281 goto bailout; 282 282 } 283 283 sdalo(adap); 284 printk("i2c (bit):1 scl: %d sda: %d \n",getscl(adap),getsda(adap));284 printk("i2c-algo-bit.o:1 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 285 285 if ( 0 != getsda(adap) ) { 286 printk("i2c (bit): %s SDA stuck high!\n",name);286 printk("i2c-algo-bit.o: %s SDA stuck high!\n",name); 287 287 sdahi(adap); 288 288 goto bailout; 289 289 } 290 290 if ( 0 == getscl(adap) ) { 291 printk("i2c (bit): %s SCL unexpected low while pulling SDA low!\n",291 printk("i2c-algo-bit.o: %s SCL unexpected low while pulling SDA low!\n", 292 292 name); 293 293 goto bailout; 294 294 } 295 295 sdahi(adap); 296 printk("i2c (bit):2 scl: %d sda: %d \n",getscl(adap),getsda(adap));296 printk("i2c-algo-bit.o:2 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 297 297 if ( 0 == getsda(adap) ) { 298 printk("i2c (bit): %s SDA stuck low!\n",name);298 printk("i2c-algo-bit.o: %s SDA stuck low!\n",name); 299 299 sdahi(adap); 300 300 goto bailout; 301 301 } 302 302 if ( 0 == getscl(adap) ) { 303 printk("i2c (bit): %s SCL unexpected low while SDA high!\n",name);303 printk("i2c-algo-bit.o: %s SCL unexpected low while SDA high!\n",name); 304 304 goto bailout; 305 305 } 306 306 scllo(adap); 307 printk("i2c (bit):3 scl: %d sda: %d \n",getscl(adap),getsda(adap));307 printk("i2c-algo-bit.o:3 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 308 308 if ( 0 != getscl(adap) ) { 309 printk("i2c (bit): %s SCL stuck high!\n",name);309 printk("i2c-algo-bit.o: %s SCL stuck high!\n",name); 310 310 sclhi(adap); 311 311 goto bailout; 312 312 } 313 313 if ( 0 == getsda(adap) ) { 314 printk("i2c (bit): %s SDA unexpected low while pulling SCL low!\n",314 printk("i2c-algo-bit.o: %s SDA unexpected low while pulling SCL low!\n", 315 315 name); 316 316 goto bailout; 317 317 } 318 318 sclhi(adap); 319 printk("i2c (bit):4 scl: %d sda: %d \n",getscl(adap),getsda(adap));319 printk("i2c-algo-bit.o:4 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 320 320 if ( 0 == getscl(adap) ) { 321 printk("i2c (bit): %s SCL stuck low!\n",name);321 printk("i2c-algo-bit.o: %s SCL stuck low!\n",name); 322 322 sclhi(adap); 323 323 goto bailout; 324 324 } 325 325 if ( 0 == getsda(adap) ) { 326 printk("i2c (bit): %s SDA unexpected low while SCL high!\n",326 printk("i2c-algo-bit.o: %s SDA unexpected low while SCL high!\n", 327 327 name); 328 328 goto bailout; 329 329 } 330 printk("i2c (bit): %s passed test.\n",name);330 printk("i2c-algo-bit.o: %s passed test.\n",name); 331 331 return 0; 332 332 bailout: … … 353 353 udelay(adap->udelay); 354 354 } 355 DEB2(if (i) printk("i2c (bit): needed %d retries for %d\n",i,addr));355 DEB2(if (i) printk("i2c-algo-bit.o: needed %d retries for %d\n",i,addr)); 356 356 return ret; 357 357 } … … 367 367 while (count > 0) { 368 368 c = *temp; 369 DEB2(printk("i2c (bit): %s i2c_write: writing %2.2X\n",369 DEB2(printk("i2c-algo-bit.o: %s i2c_write: writing %2.2X\n", 370 370 i2c_adap->name, c&0xff)); 371 371 retval = i2c_outb(i2c_adap,c); … … 375 375 wrcount++; 376 376 } else { /* arbitration or no acknowledge */ 377 printk("i2c (bit): %s i2c_write: error - bailout.\n",377 printk("i2c-algo-bit.o: %s i2c_write: error - bailout.\n", 378 378 i2c_adap->name); 379 379 i2c_stop(adap); … … 405 405 rdcount++; 406 406 } else { /* read timed out */ 407 printk("i2c (bit): i2c_read: i2c_inb timed out.\n");407 printk("i2c-algo-bit.o: i2c_read: i2c_inb timed out.\n"); 408 408 break; 409 409 } … … 418 418 if (sclhi(adap)<0) { /* timeout */ 419 419 sdahi(adap); 420 printk("i2c (bit): i2c_read: Timeout at ack\n");420 printk("i2c-algo-bit.o: i2c_read: Timeout at ack\n"); 421 421 return -ETIMEDOUT; 422 422 }; … … 488 488 ret = bit_doAddress(i2c_adap,pmsg,i2c_adap->retries); 489 489 if (ret != 0) { 490 DEB2(printk("i2c (bit): NAK from device adr %#2x msg #%d\n"490 DEB2(printk("i2c-algo-bit.o: NAK from device adr %#2x msg #%d\n" 491 491 ,msgs[i].addr,i)); 492 492 return -EREMOTEIO; … … 495 495 /* read bytes into buffer*/ 496 496 ret = readbytes(i2c_adap,pmsg->buf,pmsg->len); 497 DEB2(printk("i2c (bit): read %d bytes.\n",ret));497 DEB2(printk("i2c-algo-bit.o: read %d bytes.\n",ret)); 498 498 } else { 499 499 /* write bytes from buffer */ 500 500 ret = sendbytes(i2c_adap,pmsg->buf,pmsg->len); 501 DEB2(printk("i2c (bit): wrote %d bytes.\n",ret));501 DEB2(printk("i2c-algo-bit.o: wrote %d bytes.\n",ret)); 502 502 } 503 503 if (i<num-1) { … … 550 550 bit_adaps[i] = adap; 551 551 adap_count++; 552 DEB2(printk("i2c (bit): hw routines for %s registered.\n",adap->name));552 DEB2(printk("i2c-algo-bit.o: hw routines for %s registered.\n",adap->name)); 553 553 554 554 /* register new adapter to i2c module... */ … … 563 563 if (bit_scan) { 564 564 int ack; 565 printk(KERN_INFO " i2c (bit): scanning bus %s.\n", adap->name);565 printk(KERN_INFO " i2c-algo-bit.o: scanning bus %s.\n", adap->name); 566 566 for (i = 0x00; i < 0xff; i+=2) { 567 567 i2c_start(bit_adap); … … 593 593 break; 594 594 if ( I2C_BIT_ADAP_MAX == i) { 595 printk(KERN_WARNING " i2c (bit): could not unregister bus: %s\n",595 printk(KERN_WARNING " i2c-algo-bit.o: could not unregister bus: %s\n", 596 596 adap->name); 597 597 return -ENODEV; … … 602 602 603 603 adap_count--; 604 DEB2(printk("i2c (bit): adapter unregistered: %s\n",adap->name));604 DEB2(printk("i2c-algo-bit.o: adapter unregistered: %s\n",adap->name)); 605 605 606 606 #ifdef MODULE … … 614 614 int i; 615 615 616 printk("i2c-algo-bit.o: i2c bit algorithm module\n"); 616 617 for (i=0;i<I2C_BIT_ADAP_MAX;i++) { 617 618 bit_adaps[i]=NULL; i2c/trunk/kernel/i2c-algo-pcf.c
r3330 r3342 202 202 set_pcf(adap, 1, I2C_PCF_IDLE); 203 203 204 DEB2(printk(" algo-pcf-irq: Initialized 8584.\n"));204 DEB2(printk("i2c-algo-pcf.o: irq: Initialized 8584.\n")); 205 205 return 0; 206 206 } … … 216 216 sda=getsda(adap); 217 217 if (adap->getscl==NULL) { 218 printk("i2c (pcf): Warning: Adapter can't read from clock line - skipping test.\n");218 printk("i2c-algo-pcf.o: Warning: Adapter can't read from clock line - skipping test.\n"); 219 219 return 0; 220 220 } 221 221 scl=getscl(adap); 222 printk("i2c (pcf): Adapter: %s scl: %d sda: %d -- testing...\n",222 printk("i2c-algo-pcf.o: Adapter: %s scl: %d sda: %d -- testing...\n", 223 223 name,getscl(adap),getsda(adap)); 224 224 if (!scl || !sda ) { 225 printk("i2c (pcf): %s seems to be busy.\n",adap->name);225 printk("i2c-algo-pcf.o: %s seems to be busy.\n",adap->name); 226 226 goto bailout; 227 227 } 228 228 sdalo(adap); 229 printk("i2c (pcf):1 scl: %d sda: %d \n",getscl(adap),getsda(adap));229 printk("i2c-algo-pcf.o:1 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 230 230 if ( 0 != getsda(adap) ) { 231 printk("i2c (pcf): %s SDA stuck high!\n",name);231 printk("i2c-algo-pcf.o: %s SDA stuck high!\n",name); 232 232 sdahi(adap); 233 233 goto bailout; 234 234 } 235 235 if ( 0 == getscl(adap) ) { 236 printk("i2c (pcf): %s SCL unexpected low while pulling SDA low!\n",236 printk("i2c-algo-pcf.o: %s SCL unexpected low while pulling SDA low!\n", 237 237 name); 238 238 goto bailout; 239 239 } 240 240 sdahi(adap); 241 printk("i2c (pcf):2 scl: %d sda: %d \n",getscl(adap),getsda(adap));241 printk("i2c-algo-pcf.o:2 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 242 242 if ( 0 == getsda(adap) ) { 243 printk("i2c (pcf): %s SDA stuck low!\n",name);243 printk("i2c-algo-pcf.o: %s SDA stuck low!\n",name); 244 244 sdahi(adap); 245 245 goto bailout; 246 246 } 247 247 if ( 0 == getscl(adap) ) { 248 printk("i2c (pcf): %s SCL unexpected low while SDA high!\n",adap->name);248 printk("i2c-algo-pcf.o: %s SCL unexpected low while SDA high!\n",adap->name); 249 249 goto bailout; 250 250 } 251 251 scllo(adap); 252 printk("i2c (pcf):3 scl: %d sda: %d \n",getscl(adap),getsda(adap));252 printk("i2c-algo-pcf.o:3 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 253 253 if ( 0 != getscl(adap) ) { 254 printk("i2c (pcf): %s SCL stuck high!\n",name);254 printk("i2c-algo-pcf.o: %s SCL stuck high!\n",name); 255 255 sclhi(adap); 256 256 goto bailout; 257 257 } 258 258 if ( 0 == getsda(adap) ) { 259 printk("i2c (pcf): %s SDA unexpected low while pulling SCL low!\n",259 printk("i2c-algo-pcf.o: %s SDA unexpected low while pulling SCL low!\n", 260 260 name); 261 261 goto bailout; 262 262 } 263 263 sclhi(adap); 264 printk("i2c (pcf):4 scl: %d sda: %d \n",getscl(adap),getsda(adap));264 printk("i2c-algo-pcf.o:4 scl: %d sda: %d \n",getscl(adap),getsda(adap)); 265 265 if ( 0 == getscl(adap) ) { 266 printk("i2c (pcf): %s SCL stuck low!\n",name);266 printk("i2c-algo-pcf.o: %s SCL stuck low!\n",name); 267 267 sclhi(adap); 268 268 goto bailout; 269 269 } 270 270 if ( 0 == getsda(adap) ) { 271 printk("i2c (pcf): %s SDA unexpected low while SCL high!\n",271 printk("i2c-algo-pcf.o: %s SDA unexpected low while SCL high!\n", 272 272 name); 273 273 goto bailout; 274 274 } 275 printk("i2c (pcf): %s passed test.\n",name);275 printk("i2c-algo-pcf.o: %s passed test.\n",name); 276 276 return 0; 277 277 bailout: … … 303 303 udelay(adap->udelay); 304 304 } 305 DEB2(if (i) printk("i2c (pcf): needed %d retries for %d\n",i,addr));305 DEB2(if (i) printk("i2c-algo-pcf.o: needed %d retries for %d\n",i,addr)); 306 306 return ret; 307 307 } … … 314 314 315 315 for (wrcount=0; wrcount<count; ++wrcount) { 316 DEB2(printk("i2c (pcf): %s i2c_write: writing %2.2X\n",316 DEB2(printk("i2c-algo-pcf.o: %s i2c_write: writing %2.2X\n", 317 317 i2c_adap->name, buf[wrcount]&0xff)); 318 318 i2c_outb(adap, buf[wrcount]); 319 319 timeout = wait_for_pin(adap, &status); 320 320 if (timeout) { 321 printk("i2c (pcf): %s i2c_write: error - timeout.\n",321 printk("i2c-algo-pcf.o: %s i2c_write: error - timeout.\n", 322 322 i2c_adap->name); 323 323 i2c_stop(adap); … … 325 325 } 326 326 if (status & I2C_PCF_LRB) { 327 printk("i2c (pcf): %s i2c_write: error - no ack.\n",327 printk("i2c-algo-pcf.o: %s i2c_write: error - no ack.\n", 328 328 i2c_adap->name); 329 329 i2c_stop(adap); … … 349 349 timeout = wait_for_pin(adap, &status); 350 350 if (timeout) { 351 printk("i2c (pcf): i2c_read: i2c_inb timed out.\n");351 printk("i2c-algo-pcf.o: i2c_read: i2c_inb timed out.\n"); 352 352 return (-1); 353 353 } 354 354 if (status & I2C_PCF_LRB) { 355 printk("i2c (pcf): i2c_read: i2c_inb, No ack.\n");355 printk("i2c-algo-pcf.o: i2c_read: i2c_inb, No ack.\n"); 356 356 return (-1); 357 357 } … … 366 366 timeout = wait_for_pin(adap, &status); 367 367 if (timeout) { 368 printk("i2c (pcf): i2c_read: i2c_inb timed out.\n");368 printk("i2c-algo-pcf.o: i2c_read: i2c_inb timed out.\n"); 369 369 return (-1); 370 370 } … … 425 425 timeout = wait_for_bb(adap); 426 426 if (timeout) { 427 DEB2(printk(" Timeout waiting for BB in pcf_xfer\n");)427 DEB2(printk("i2c-algo-pcf.o: Timeout waiting for BB in pcf_xfer\n");) 428 428 return -EIO; 429 429 } … … 433 433 434 434 for (i=0; i<num; i++) { 435 DEB3(printk(" Msg %d, addr=0x%x, flags=0x%x, len=%d\n",435 DEB3(printk("i2c-algo-pcf.o: Msg %d, addr=0x%x, flags=0x%x, len=%d\n", 436 436 i, msgs[i].addr, msgs[i].flags, msgs[i].len);) 437 437 timeout = wait_for_pin(adap, &status); 438 438 if (timeout) { 439 DEB2(printk(" Timeout waiting for PIN(1) in pcf_xfer\n");)439 DEB2(printk("i2c-algo-pcf.o: Timeout waiting for PIN(1) in pcf_xfer\n");) 440 440 i2c_stop(adap); 441 441 return (-EREMOTEIO); … … 443 443 if (status & I2C_PCF_LRB) { 444 444 i2c_stop(adap); 445 DEB2(printk("i2c (pcf): NAK from device adr %#2x msg #%d\n"445 DEB2(printk("i2c-algo-pcf.o: NAK from device adr %#2x msg #%d\n" 446 446 ,msgs[i].addr,i)); 447 447 return -EREMOTEIO; … … 450 450 /* read bytes into buffer*/ 451 451 ret = pcf_readbytes(i2c_adap, pmsg->buf, pmsg->len); 452 DEB2(printk("i2c (pcf): read %d bytes.\n",ret));452 DEB2(printk("i2c-algo-pcf.o: read %d bytes.\n",ret)); 453 453 } else { 454 454 /* write bytes from buffer */ 455 455 ret = pcf_sendbytes(i2c_adap, pmsg->buf, pmsg->len); 456 DEB2(printk("i2c (pcf): wrote %d bytes.\n",ret));456 DEB2(printk("i2c-algo-pcf.o: wrote %d bytes.\n",ret)); 457 457 } 458 458 if (i == (num-1)) { … … 470 470 timeout = wait_for_pin(adap, &status); 471 471 if (timeout) { 472 DEB2(printk(" Timeout waiting for PIN(2) in pcf_xfer\n");)472 DEB2(printk("i2c-algo-pcf.o: Timeout waiting for PIN(2) in pcf_xfer\n");) 473 473 return (-EREMOTEIO); 474 474 } 475 475 if (status & I2C_PCF_LRB) { 476 476 i2c_stop(adap); 477 DEB2(printk(" No LRB(2) in pcf_xfer\n");)477 DEB2(printk("i2c-algo-pcf.o: No LRB(2) in pcf_xfer\n");) 478 478 return (-EREMOTEIO); 479 479 } … … 524 524 i2c_pcf_adaps[i] = adap; 525 525 adap_count++; 526 DEB2(printk("i2c (pcf): hw routines for %s registered.\n",adap->name));526 DEB2(printk("i2c-algo-pcf.o: hw routines for %s registered.\n",adap->name)); 527 527 528 528 /* register new adapter to i2c module... */ … … 543 543 /* scan bus */ 544 544 if (pcf_scan) { 545 printk(KERN_INFO " i2c (pcf): scanning bus %s.\n", adap->name);545 printk(KERN_INFO " i2c-algo-pcf.o: scanning bus %s.\n", adap->name); 546 546 for (i = 0x00; i < 0xff; i+=2) { 547 547 i2c_outb(pcf_adap, i); … … 570 570 break; 571 571 if ( I2C_PCF_ADAP_MAX == i) { 572 printk(KERN_WARNING " i2c (pcf): could not unregister bus: %s\n",572 printk(KERN_WARNING " i2c-algo-pcf.o: could not unregister bus: %s\n", 573 573 adap->name); 574 574 return -ENODEV; … … 578 578 i2c_del_adapter(adap); 579 579 adap_count--; 580 DEB2(printk("i2c (pcf): adapter unregistered: %s\n",adap->name));580 DEB2(printk("i2c-algo-pcf.o: adapter unregistered: %s\n",adap->name)); 581 581 582 582 #ifdef MODULE … … 590 590 int i; 591 591 592 printk("i2c-algo-pcf.o: i2c pcf8584 algorithm module\n"); 592 593 for (i=0;i<I2C_PCF_ADAP_MAX;i++) { 593 594 i2c_pcf_adaps[i]=NULL; i2c/trunk/kernel/i2c-core.c
r3341 r3342 184 184 if (I2C_ALGO_MAX == i) { 185 185 printk(KERN_WARNING 186 " i2c : register_algorithm(%s) - enlarge I2C_ALGO_MAX.\n",186 " i2c-core.o: register_algorithm(%s) - enlarge I2C_ALGO_MAX.\n", 187 187 algo->name); 188 188 return -ENOMEM; … … 192 192 algo_count++; 193 193 194 DEB(printk("i2 c: algorithm %s registered.\n",algo->name));194 DEB(printk("i2-core.o: algorithm %s registered.\n",algo->name)); 195 195 return 0; 196 196 } … … 206 206 if (I2C_ALGO_MAX == i) { 207 207 printk(KERN_WARNING 208 " i2c : unregister_algorithm: [%s] not found.\n",208 " i2c-core.o: unregister_algorithm: [%s] not found.\n", 209 209 algo->name); 210 210 return -ENODEV; … … 213 213 algo_count--; 214 214 215 DEB(printk("i2c : algorithm unregistered: %s\n",algo->name));215 DEB(printk("i2c-core.o: algorithm unregistered: %s\n",algo->name)); 216 216 return 0; 217 217 } … … 232 232 if (I2C_ADAP_MAX == i) { 233 233 printk(KERN_WARNING 234 " i2c : register_adapter(%s) - enlarge I2C_ADAP_MAX.\n",234 " i2c-core.o: register_adapter(%s) - enlarge I2C_ADAP_MAX.\n", 235 235 adap->name); 236 236 return -ENOMEM; … … 255 255 proc_entry = create_proc_entry(name,0,proc_bus); 256 256 if (! proc_entry) { 257 printk("i2c-core : Could not create /proc/bus/%s\n",257 printk("i2c-core.o: Could not create /proc/bus/%s\n", 258 258 name); 259 259 return -ENOENT; … … 267 267 if (!(proc_entry = kmalloc(sizeof(struct proc_dir_entry)+ 268 268 strlen(name)+1, GFP_KERNEL))) { 269 printk("i2c-core : Out of memory!\n");269 printk("i2c-core.o: Out of memory!\n"); 270 270 return -ENOMEM; 271 271 } … … 285 285 286 286 if ((res = proc_register_dynamic(&proc_bus_dir, proc_entry))) { 287 printk("i2c-core : Could not create %s.\n",name);287 printk("i2c-core.o: Could not create %s.\n",name); 288 288 kfree(proc_entry); 289 289 return res; … … 303 303 drivers[j]->attach_adapter(adap); 304 304 305 DEB(printk("i2c : adapter %s registered as adapter %d.\n",adap->name,i));305 DEB(printk("i2c-core.o: adapter %s registered as adapter %d.\n",adap->name,i)); 306 306 307 307 return 0; … … 316 316 break; 317 317 if (I2C_ADAP_MAX == i) { 318 printk( " i2c : unregister_adapter adap [%s] not found.\n",318 printk( " i2c-core.o: unregister_adapter adap [%s] not found.\n", 319 319 adap->name); 320 320 return -ENODEV; … … 331 331 if ((res = proc_unregister(&proc_bus_dir, 332 332 adapters[i]->proc_entry->low_ino))) { 333 printk("i2c-core : Deregistration of /proc "333 printk("i2c-core.o: Deregistration of /proc " 334 334 "entry failed\n" 335 335 return res; … … 357 357 adap_count--; 358 358 359 DEB(printk("i2c : adapter unregistered: %s\n",adap->name));359 DEB(printk("i2c-core.o: adapter unregistered: %s\n",adap->name)); 360 360 return 0; 361 361 } … … 376 376 if (I2C_DRIVER_MAX == i) { 377 377 printk(KERN_WARNING 378 " i2c : register_driver(%s) - enlarge I2C_DRIVER_MAX.\n",378 " i2c-core.o: register_driver(%s) - enlarge I2C_DRIVER_MAX.\n", 379 379 driver->name); 380 380 return -ENOMEM; … … 384 384 driver_count++; 385 385 386 DEB(printk("i2c : driver %s registered.\n",driver->name));386 DEB(printk("i2c-core.o: driver %s registered.\n",driver->name)); 387 387 388 388 /* now look for instances of driver on our adapters … … 404 404 break; 405 405 if (I2C_DRIVER_MAX == i) { 406 printk(KERN_WARNING " i2c : unregister_driver: [%s] not found\n",406 printk(KERN_WARNING " i2c-core.o: unregister_driver: [%s] not found\n", 407 407 driver->name); 408 408 return -ENODEV; … … 412 412 * afterwards. 413 413 */ 414 DEB2(printk("i2c : unregister_driver - looking for clients.\n"));414 DEB2(printk("i2c-core.o: unregister_driver - looking for clients.\n")); 415 415 /* removing clients does not depend on the notify flag, else 416 416 * invalid operation might (will!) result, when using stale client … … 421 421 if (adap == NULL) /* skip empty entries. */ 422 422 continue; 423 DEB2(printk("i2c : examining adapter %s:\n",adap->name));423 DEB2(printk("i2c-core.o: examining adapter %s:\n",adap->name)); 424 424 for (j=0;j<I2C_CLIENT_MAX;j++) { 425 425 struct i2c_client *client = adap->clients[j]; 426 426 if (client != NULL && client->driver == driver) { 427 DEB2(printk("i2c : detaching client %s:\n",427 DEB2(printk("i2c-core.o: detaching client %s:\n", 428 428 client->name)); 429 429 /*i2c_detach_client(client);*/ … … 435 435 driver_count--; 436 436 437 DEB(printk("i2c : driver unregistered: %s\n",driver->name));437 DEB(printk("i2c-core.o: driver unregistered: %s\n",driver->name)); 438 438 return 0; 439 439 } … … 450 450 if (I2C_CLIENT_MAX == i) { 451 451 printk(KERN_WARNING 452 " i2c : attach_client(%s) - enlarge I2C_CLIENT_MAX.\n",452 " i2c-core.o: attach_client(%s) - enlarge I2C_CLIENT_MAX.\n", 453 453 client->name); 454 454 return -ENOMEM; … … 459 459 if (adapter->client_register != NULL) 460 460 adapter->client_register(client); 461 DEB(printk("i2c : client [%s] registered to adapter [%s](pos. %d).\n",461 DEB(printk("i2c-core.o: client [%s] registered to adapter [%s](pos. %d).\n", 462 462 client->name, adapter->name,i)); 463 463 return 0; … … 474 474 break; 475 475 if (I2C_CLIENT_MAX == i) { 476 printk(KERN_WARNING " i2c : unregister_client [%s] not found\n",476 printk(KERN_WARNING " i2c-core.o: unregister_client [%s] not found\n", 477 477 client->name); 478 478 return -ENODEV; … … 484 484 adapter->clients[i] = NULL; 485 485 adapter->client_count--; 486 DEB(printk("i2c : client [%s] unregistered.\n",client->name));486 DEB(printk("i2c-core.o: client [%s] unregistered.\n",client->name)); 487 487 return 0; 488 488 } … … 613 613 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) 614 614 if (! proc_bus) { 615 printk("i2c-core : /proc/bus/ does not exist");615 printk("i2c-core.o: /proc/bus/ does not exist"); 616 616 i2cproc_cleanup(); 617 617 return -ENOENT; … … 619 619 proc_bus_i2c = create_proc_entry("i2c",0,proc_bus); 620 620 if (!proc_bus_i2c) { 621 printk("i2c-core : Could not create /proc/bus/i2c");621 printk("i2c-core.o: Could not create /proc/bus/i2c"); 622 622 i2cproc_cleanup(); 623 623 return -ENOENT; … … 635 635 proc_bus_dir.ops = proc_net.ops; 636 636 if ((res = proc_register_dynamic(&proc_root, &proc_bus_dir))) { 637 printk("i2c-core : Could not create /proc/bus/");637 printk("i2c-core.o: Could not create /proc/bus/"); 638 638 i2cproc_cleanup(); 639 639 return res; … … 641 641 i2cproc_initialized ++; 642 642 if ((res = proc_register_dynamic(&proc_bus_dir, &proc_bus_i2c_dir))) { 643 printk("i2c-core : Could not create /proc/bus/i2c\n");643 printk("i2c-core.o: Could not create /proc/bus/i2c\n"); 644 644 i2cproc_cleanup(); 645 645 return res; … … 661 661 if ((res = proc_unregister(&proc_bus_dir, 662 662 proc_bus_i2c_dir.low_ino))) { 663 printk("i2c-core : could not delete "663 printk("i2c-core.o: could not delete " 664 664 "/proc/bus/i2c, module not removed."); 665 665 return res; … … 668 668 } 669 669 if ((res = proc_unregister(&proc_root,proc_bus_dir.low_ino))) { 670 printk("i2c-core : could not delete /proc/bus/, "670 printk("i2c-core.o: could not delete /proc/bus/, " 671 671 "module not removed."); 672 672 return res; … … 691 691 692 692 if (adap->algo->master_xfer) { 693 DEB(printk(" master_xfer: %s with %d msgs.\n",adap->name,num));693 DEB(printk("i2c-core.o: master_xfer: %s with %d msgs.\n",adap->name,num)); 694 694 695 695 I2C_LOCK(adap); … … 699 699 return ret; 700 700 } else { 701 printk(" I2C adapter %04x: I2C level transfers not supported\n",701 printk("i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n", 702 702 adap->id); 703 703 return 0; … … 717 717 (const char *)msg.buf = buf; 718 718 719 DEB(printk(" master_send: writing %d bytes on %s.\n",719 DEB(printk("i2c-core.o: master_send: writing %d bytes on %s.\n", 720 720 count,client->adapter->name)); 721 721 … … 729 729 return (ret == 1 )? count : ret; 730 730 } else { 731 printk(" I2C adapter %04x: I2C level transfers not supported\n",731 printk("i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n", 732 732 client->adapter->id); 733 733 return 0; … … 756 756 memcpy(&c[1], buf, sizeof(char)*count); 757 757 758 DEB(printk(" master_send_subadress: writing %d bytes on %s. (sa:0x%02x)\n",758 DEB(printk("i2c-core.o: master_send_subadress: writing %d bytes on %s. (sa:0x%02x)\n", 759 759 count,client->adapter->name,subadress)); 760 760 … … 771 771 return (ret == 1 )? count : ret; 772 772 } else { 773 printk(" I2C adapter %04x: I2C level transfers not supported\n",773 printk("i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n", 774 774 client->adapter->id); 775 775 return 0; … … 796 796 (const char*)msg[1].buf = (const char*)buf; 797 797 798 DEB(printk(" master_recv_subadress: reading %d bytes from subadress %d on %s.\n",798 DEB(printk("i2c-core.o: master_recv_subadress: reading %d bytes from subadress %d on %s.\n", 799 799 count,subadress,client->adapter->name)); 800 800 … … 808 808 return (ret == 1 ) ? 0 : ret; 809 809 } else { 810 printk(" I2C adapter %04x: I2C level transfers not supported\n",810 printk("i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n", 811 811 client->adapter->id); 812 812 return 0; … … 828 828 msg.buf = buf; 829 829 830 DEB(printk(" master_recv: reading %d bytes on %s.\n",830 DEB(printk("i2c-core.o: master_recv: reading %d bytes on %s.\n", 831 831 count,client->adapter->name)); 832 832 … … 835 835 I2C_UNLOCK(adap); 836 836 837 DEB(printk(" master_recv: return:%d (count:%d, addr:0x%02x)\n",837 DEB(printk("i2c-core.o: master_recv: return:%d (count:%d, addr:0x%02x)\n", 838 838 ret, count, client->addr)); 839 839 … … 843 843 return (ret == 1 )? count : ret; 844 844 } else { 845 printk(" I2C adapter %04x: I2C level transfers not supported\n",845 printk("i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n", 846 846 client->adapter->id); 847 847 return 0; … … 856 856 struct i2c_adapter *adap = client->adapter; 857 857 858 DEB2(printk("i2c ioctl, cmd: 0x%x, arg: %#lx\n", cmd, arg));858 DEB2(printk("i2c-core.o: i2c ioctl, cmd: 0x%x, arg: %#lx\n", cmd, arg)); 859 859 switch ( cmd ) { 860 860 case I2C_RETRIES: … … 893 893 return (i <= hi_addr) ? (client->addr=i) : -1; 894 894 } else { 895 printk(" I2C adapter %04x: I2C level transfers not supported\n",895 printk("i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n", 896 896 client->adapter->id); 897 897 return 0; … … 1078 1078 case I2C_SMBUS_BLOCK_DATA: 1079 1079 if (read_write == I2C_SMBUS_READ) { 1080 printk(" smbus.o: Block read not supported under "1080 printk("i2c-core.o: Block read not supported under " 1081 1081 "I2C emulation!\n"); 1082 1082 return -1; … … 1084 1084 msg[1].len = data->block[0] + 1; 1085 1085 if (msg[1].len > 32) { 1086 printk(" smbus.o: smbus_access called with "1086 printk("i2c-core.o: smbus_access called with " 1087 1087 "invalid block write size (%d)\n", 1088 1088 msg[1].len); … … 1094 1094 break; 1095 1095 default: 1096 printk(" smbus.o: smbus_access called with invalid size (%d)\n",1096 printk("i2c-core.o: smbus_access called with invalid size (%d)\n", 1097 1097 size); 1098 1098 return -1; … … 1138 1138 { 1139 1139 /* clear algorithms */ 1140 printk("i2c-core.o: i2c core module\n"); 1140 1141 memset(algorithms,0,sizeof(algorithms)); 1141 1142 memset(adapters,0,sizeof(adapters)); … … 1147 1148 i2cproc_init(); 1148 1149 1149 printk(KERN_INFO "i2c module initialized.\n");1150 1150 return 0; 1151 1151 } i2c/trunk/kernel/i2c-dev.c
r3333 r3342 172 172 struct inode *inode = file->f_dentry->d_inode; 173 173 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,70)) */ 174 printk("i2c _dev,o: i2c-%d lseek to %ld bytes relative to %d.\n",174 printk("i2c-dev,o: i2c-%d lseek to %ld bytes relative to %d.\n", 175 175 MINOR(inode->i_rdev),(long) offset,origin); 176 176 #endif /* DEBUG */ … … 206 206 207 207 #ifdef DEBUG 208 printk("i2c _dev,o: i2c-%d reading %d bytes.\n",MINOR(inode->i_rdev),count);208 printk("i2c-dev,o: i2c-%d reading %d bytes.\n",MINOR(inode->i_rdev),count); 209 209 #endif 210 210 … … 243 243 244 244 #ifdef DEBUG 245 printk("i2c _dev,o: i2c-%d writing %d bytes.\n",MINOR(inode->i_rdev),count);245 printk("i2c-dev,o: i2c-%d writing %d bytes.\n",MINOR(inode->i_rdev),count); 246 246 #endif 247 247 ret = i2c_master_send(client,tmp,count); … … 259 259 260 260 #ifdef DEBUG 261 printk("i2c _dev.o: i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n",261 printk("i2c-dev.o: i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n", 262 262 MINOR(inode->i_rdev),cmd, arg); 263 263 #endif /* DEBUG */ … … 501 501 int res; 502 502 503 printk("i2c-dev.o: i2c /dev entries driver module\n"); 504 503 505 i2cdev_initialized = 0; 504 506 if (register_chrdev(I2C_MAJOR,"i2c",&i2cdev_fops)) { i2c/trunk/kernel/i2c-elektor.c
r3330 r3342 75 75 if (ctl) { 76 76 if (gpi.pi_irq > 0) {
