The patch number 9754 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]
------
From: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
em28xx: improve debug messages
Now, the first message states board names. Also, removed printing the alternate
settings by default. I2C messages are now clearer.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
linux/drivers/media/video/em28xx/em28xx-cards.c | 11 +++-
linux/drivers/media/video/em28xx/em28xx-i2c.c | 36 ++++++++--------
linux/drivers/media/video/em28xx/em28xx-video.c | 6 --
3 files changed, 28 insertions(+), 25 deletions(-)
diff -r f5e1a7d4d15a -r ce1e93e4e1c8
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c Tue Nov 25 10:43:29
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c Tue Nov 25 11:06:21
2008 -0200
@@ -1279,6 +1279,10 @@ void em28xx_pre_card_setup(struct em28xx
{
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;
@@ -1289,7 +1293,8 @@ void em28xx_pre_card_setup(struct em28xx
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;
@@ -1312,7 +1317,7 @@ void em28xx_pre_card_setup(struct em28xx
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);
}
}
@@ -1320,8 +1325,6 @@ void em28xx_pre_card_setup(struct em28xx
rc = em28xx_read_reg(dev, dev->reg_gpo_num);
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 -r f5e1a7d4d15a -r ce1e93e4e1c8
linux/drivers/media/video/em28xx/em28xx-i2c.c
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c Tue Nov 25 10:43:29
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c Tue Nov 25 11:06:21
2008 -0200
@@ -388,47 +388,49 @@ static int em28xx_i2c_eeprom(struct em28
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");
- break;
- }
- printk(KERN_INFO "Table at 0x%02x, strings=0x%04x, 0x%04x, 0x%04x\n",
+ printk(KERN_INFO "%s:\t200mA max power\n", dev->name);
+ break;
+ }
+ 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 -r f5e1a7d4d15a -r ce1e93e4e1c8
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c Tue Nov 25 10:43:29
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c Tue Nov 25 11:06:21
2008 -0200
@@ -2354,7 +2354,7 @@ static int em28xx_usb_probe(struct usb_i
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);
@@ -2370,7 +2370,7 @@ static int em28xx_usb_probe(struct usb_i
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]);
}
@@ -2385,8 +2385,6 @@ static int em28xx_usb_probe(struct usb_i
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);
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/ce1e93e4e1c8c3adeadf46a346268e9919343cf3
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits