summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 10:06:21 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 17:53:42 -0200
commit1bee0184f6ffba1263a4b1e5732cde2c5292d843 (patch)
tree9539e3a347c0620c41b444a316df3a286a335ccf /drivers/media/video/em28xx
parentec5de990d912c0d5cca98e030bf6447c1529f56d (diff)
downloadtalos-obmc-linux-1bee0184f6ffba1263a4b1e5732cde2c5292d843.tar.gz
talos-obmc-linux-1bee0184f6ffba1263a4b1e5732cde2c5292d843.zip
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>
Diffstat (limited to 'drivers/media/video/em28xx')
-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)
{
int rc;
+ em28xx_set_model(dev);
+
+ em28xx_info("Found %s\n", dev->board.name);
+
/* Set the default GPO/GPIO for legacy devices */
dev->reg_gpo_num = EM2880_R04_GPO;
dev->reg_gpio_num = EM28XX_R08_GPIO;
@@ -1284,7 +1288,8 @@ void em28xx_pre_card_setup(struct em28xx *dev)
rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
if (rc > 0) {
dev->chip_id = rc;
- switch (rc) {
+
+ switch (dev->chip_id) {
case CHIP_ID_EM2750:
em28xx_info("chip ID is em2750\n");
break;
@@ -1307,7 +1312,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
dev->wait_after_write = 0;
break;
default:
- em28xx_info("em28xx chip ID = %d\n", rc);
+ em28xx_info("em28xx chip ID = %d\n", dev->chip_id);
}
}
@@ -1316,8 +1321,6 @@ void em28xx_pre_card_setup(struct em28xx *dev)
if (rc >= 0)
dev->reg_gpo = rc;
- em28xx_set_model(dev);
-
/* Those are the default values for the majority of boards
Use those values if not specified otherwise at boards entry
*/
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)
if (em_eeprom->id == 0x9567eb1a)
dev->hash = em28xx_hash_mem(eedata, len, 32);
- printk(KERN_INFO "EEPROM ID= 0x%08x, hash = 0x%08lx\n",
- em_eeprom->id, dev->hash);
- printk(KERN_INFO "Vendor/Product ID= %04x:%04x\n", em_eeprom->vendor_ID,
- em_eeprom->product_ID);
+ printk(KERN_INFO "%s: EEPROM ID= 0x%08x, EEPROM hash = 0x%08lx\n",
+ dev->name, em_eeprom->id, dev->hash);
+
+ printk(KERN_INFO "%s: EEPROM info:\n", dev->name);
switch (em_eeprom->chip_conf >> 4 & 0x3) {
case 0:
- printk(KERN_INFO "No audio on board.\n");
+ printk(KERN_INFO "%s:\tNo audio on board.\n", dev->name);
break;
case 1:
- printk(KERN_INFO "AC97 audio (5 sample rates)\n");
+ printk(KERN_INFO "%s:\tAC97 audio (5 sample rates)\n",
+ dev->name);
break;
case 2:
- printk(KERN_INFO "I2S audio, sample rate=32k\n");
+ printk(KERN_INFO "%s:\tI2S audio, sample rate=32k\n", dev->name);
break;
case 3:
- printk(KERN_INFO "I2S audio, 3 sample rates\n");
+ printk(KERN_INFO "%s:\tI2S audio, 3 sample rates\n", dev->name);
break;
}
if (em_eeprom->chip_conf & 1 << 3)
- printk(KERN_INFO "USB Remote wakeup capable\n");
+ printk(KERN_INFO "%s:\tUSB Remote wakeup capable\n", dev->name);
if (em_eeprom->chip_conf & 1 << 2)
- printk(KERN_INFO "USB Self power capable\n");
+ printk(KERN_INFO "%s:\tUSB Self power capable\n", dev->name);
switch (em_eeprom->chip_conf & 0x3) {
case 0:
- printk(KERN_INFO "500mA max power\n");
+ printk(KERN_INFO "%s:\t500mA max power\n", dev->name);
break;
case 1:
- printk(KERN_INFO "400mA max power\n");
+ printk(KERN_INFO "%s:\t400mA max power\n", dev->name);
break;
case 2:
- printk(KERN_INFO "300mA max power\n");
+ printk(KERN_INFO "%s:\t300mA max power\n", dev->name);
break;
case 3:
- printk(KERN_INFO "200mA max power\n");
+ printk(KERN_INFO "%s:\t200mA max power\n", dev->name);
break;
}
- printk(KERN_INFO "Table at 0x%02x, strings=0x%04x, 0x%04x, 0x%04x\n",
+ printk(KERN_INFO "%s:\tTable at 0x%02x, strings=0x%04x, 0x%04x, 0x%04x\n",
+ dev->name,
em_eeprom->string_idx_table,
em_eeprom->string1,
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,
uif = udev->actconfig->interface[0];
dev->num_alt = uif->num_altsetting;
- em28xx_info("Alternate settings: %i\n", dev->num_alt);
+ em28xx_videodbg("Alternate settings: %i\n", dev->num_alt);
/* dev->alt_max_pkt_size = kmalloc(sizeof(*dev->alt_max_pkt_size)* */
dev->alt_max_pkt_size = kmalloc(32 * dev->num_alt, GFP_KERNEL);
@@ -2288,7 +2288,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
wMaxPacketSize);
dev->alt_max_pkt_size[i] =
(tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
- em28xx_info("Alternate setting %i, max size= %i\n", i,
+ em28xx_videodbg("Alternate setting %i, max size= %i\n", i,
dev->alt_max_pkt_size[i]);
}
@@ -2304,8 +2304,6 @@ static int em28xx_usb_probe(struct usb_interface *interface,
return retval;
}
- em28xx_info("Found %s\n", em28xx_boards[dev->model].name);
-
/* save our data pointer in this interface device */
usb_set_intfdata(interface, dev);
OpenPOWER on IntegriCloud