aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 08:06:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:42 -0500
commit1bee0184f6ffba1263a4b1e5732cde2c5292d843 (patch)
tree9539e3a347c0620c41b444a316df3a286a335ccf
parentec5de990d912c0d5cca98e030bf6447c1529f56d (diff)
V4L/DVB (9754): em28xx: improve debug messages
Now, the first message states board names. Also, removed printing the alternate settings by default. I2C messages are now clearer. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c11
-rw-r--r--drivers/media/video/em28xx/em28xx-i2c.c32
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c6
3 files changed, 26 insertions, 23 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 8b82c5528a16..3013abd00e05 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1274,6 +1274,10 @@ void em28xx_pre_card_setup(struct em28xx *dev)
1274{ 1274{
1275 int rc; 1275 int rc;
1276 1276
1277 em28xx_set_model(dev);
1278
1279 em28xx_info("Found %s\n", dev->board.name);
1280
1277 /* Set the default GPO/GPIO for legacy devices */ 1281 /* Set the default GPO/GPIO for legacy devices */
1278 dev->reg_gpo_num = EM2880_R04_GPO; 1282 dev->reg_gpo_num = EM2880_R04_GPO;
1279 dev->reg_gpio_num = EM28XX_R08_GPIO; 1283 dev->reg_gpio_num = EM28XX_R08_GPIO;
@@ -1284,7 +1288,8 @@ void em28xx_pre_card_setup(struct em28xx *dev)
1284 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); 1288 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
1285 if (rc > 0) { 1289 if (rc > 0) {
1286 dev->chip_id = rc; 1290 dev->chip_id = rc;
1287 switch (rc) { 1291
1292 switch (dev->chip_id) {
1288 case CHIP_ID_EM2750: 1293 case CHIP_ID_EM2750:
1289 em28xx_info("chip ID is em2750\n"); 1294 em28xx_info("chip ID is em2750\n");
1290 break; 1295 break;
@@ -1307,7 +1312,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
1307 dev->wait_after_write = 0; 1312 dev->wait_after_write = 0;
1308 break; 1313 break;
1309 default: 1314 default:
1310 em28xx_info("em28xx chip ID = %d\n", rc); 1315 em28xx_info("em28xx chip ID = %d\n", dev->chip_id);
1311 } 1316 }
1312 } 1317 }
1313 1318
@@ -1316,8 +1321,6 @@ void em28xx_pre_card_setup(struct em28xx *dev)
1316 if (rc >= 0) 1321 if (rc >= 0)
1317 dev->reg_gpo = rc; 1322 dev->reg_gpo = rc;
1318 1323
1319 em28xx_set_model(dev);
1320
1321 /* Those are the default values for the majority of boards 1324 /* Those are the default values for the majority of boards
1322 Use those values if not specified otherwise at boards entry 1325 Use those values if not specified otherwise at boards entry
1323 */ 1326 */
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c
index 78d60231ee3f..d69f0efcc9aa 100644
--- a/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/drivers/media/video/em28xx/em28xx-i2c.c
@@ -388,47 +388,49 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned char *eedata, int len)
388 if (em_eeprom->id == 0x9567eb1a) 388 if (em_eeprom->id == 0x9567eb1a)
389 dev->hash = em28xx_hash_mem(eedata, len, 32); 389 dev->hash = em28xx_hash_mem(eedata, len, 32);
390 390
391 printk(KERN_INFO "EEPROM ID= 0x%08x, hash = 0x%08lx\n", 391 printk(KERN_INFO "%s: EEPROM ID= 0x%08x, EEPROM hash = 0x%08lx\n",
392 em_eeprom->id, dev->hash); 392 dev->name, em_eeprom->id, dev->hash);
393 printk(KERN_INFO "Vendor/Product ID= %04x:%04x\n", em_eeprom->vendor_ID, 393
394 em_eeprom->product_ID); 394 printk(KERN_INFO "%s: EEPROM info:\n", dev->name);
395 395
396 switch (em_eeprom->chip_conf >> 4 & 0x3) { 396 switch (em_eeprom->chip_conf >> 4 & 0x3) {
397 case 0: 397 case 0:
398 printk(KERN_INFO "No audio on board.\n"); 398 printk(KERN_INFO "%s:\tNo audio on board.\n", dev->name);
399 break; 399 break;
400 case 1: 400 case 1:
401 printk(KERN_INFO "AC97 audio (5 sample rates)\n"); 401 printk(KERN_INFO "%s:\tAC97 audio (5 sample rates)\n",
402 dev->name);
402 break; 403 break;
403 case 2: 404 case 2:
404 printk(KERN_INFO "I2S audio, sample rate=32k\n"); 405 printk(KERN_INFO "%s:\tI2S audio, sample rate=32k\n", dev->name);
405 break; 406 break;
406 case 3: 407 case 3:
407 printk(KERN_INFO "I2S audio, 3 sample rates\n"); 408 printk(KERN_INFO "%s:\tI2S audio, 3 sample rates\n", dev->name);
408 break; 409 break;
409 } 410 }
410 411
411 if (em_eeprom->chip_conf & 1 << 3) 412 if (em_eeprom->chip_conf & 1 << 3)
412 printk(KERN_INFO "USB Remote wakeup capable\n"); 413 printk(KERN_INFO "%s:\tUSB Remote wakeup capable\n", dev->name);
413 414
414 if (em_eeprom->chip_conf & 1 << 2) 415 if (em_eeprom->chip_conf & 1 << 2)
415 printk(KERN_INFO "USB Self power capable\n"); 416 printk(KERN_INFO "%s:\tUSB Self power capable\n", dev->name);
416 417
417 switch (em_eeprom->chip_conf & 0x3) { 418 switch (em_eeprom->chip_conf & 0x3) {
418 case 0: 419 case 0:
419 printk(KERN_INFO "500mA max power\n"); 420 printk(KERN_INFO "%s:\t500mA max power\n", dev->name);
420 break; 421 break;
421 case 1: 422 case 1:
422 printk(KERN_INFO "400mA max power\n"); 423 printk(KERN_INFO "%s:\t400mA max power\n", dev->name);
423 break; 424 break;
424 case 2: 425 case 2:
425 printk(KERN_INFO "300mA max power\n"); 426 printk(KERN_INFO "%s:\t300mA max power\n", dev->name);
426 break; 427 break;
427 case 3: 428 case 3:
428 printk(KERN_INFO "200mA max power\n"); 429 printk(KERN_INFO "%s:\t200mA max power\n", dev->name);
429 break; 430 break;
430 } 431 }
431 printk(KERN_INFO "Table at 0x%02x, strings=0x%04x, 0x%04x, 0x%04x\n", 432 printk(KERN_INFO "%s:\tTable at 0x%02x, strings=0x%04x, 0x%04x, 0x%04x\n",
433 dev->name,
432 em_eeprom->string_idx_table, 434 em_eeprom->string_idx_table,
433 em_eeprom->string1, 435 em_eeprom->string1,
434 em_eeprom->string2, 436 em_eeprom->string2,
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 845253c5d2a1..acda76f86ff8 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -2272,7 +2272,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
2272 uif = udev->actconfig->interface[0]; 2272 uif = udev->actconfig->interface[0];
2273 2273
2274 dev->num_alt = uif->num_altsetting; 2274 dev->num_alt = uif->num_altsetting;
2275 em28xx_info("Alternate settings: %i\n", dev->num_alt); 2275 em28xx_videodbg("Alternate settings: %i\n", dev->num_alt);
2276/* dev->alt_max_pkt_size = kmalloc(sizeof(*dev->alt_max_pkt_size)* */ 2276/* dev->alt_max_pkt_size = kmalloc(sizeof(*dev->alt_max_pkt_size)* */
2277 dev->alt_max_pkt_size = kmalloc(32 * dev->num_alt, GFP_KERNEL); 2277 dev->alt_max_pkt_size = kmalloc(32 * dev->num_alt, GFP_KERNEL);
2278 2278
@@ -2288,7 +2288,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
2288 wMaxPacketSize); 2288 wMaxPacketSize);
2289 dev->alt_max_pkt_size[i] = 2289 dev->alt_max_pkt_size[i] =
2290 (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); 2290 (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
2291 em28xx_info("Alternate setting %i, max size= %i\n", i, 2291 em28xx_videodbg("Alternate setting %i, max size= %i\n", i,
2292 dev->alt_max_pkt_size[i]); 2292 dev->alt_max_pkt_size[i]);
2293 } 2293 }
2294 2294
@@ -2304,8 +2304,6 @@ static int em28xx_usb_probe(struct usb_interface *interface,
2304 return retval; 2304 return retval;
2305 } 2305 }
2306 2306
2307 em28xx_info("Found %s\n", em28xx_boards[dev->model].name);
2308
2309 /* save our data pointer in this interface device */ 2307 /* save our data pointer in this interface device */
2310 usb_set_intfdata(interface, dev); 2308 usb_set_intfdata(interface, dev);
2311 2309