summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/cx231xx/cx231xx-audio.c2
-rw-r--r--linux/drivers/media/video/cx231xx/cx231xx-cards.c434
-rw-r--r--linux/drivers/media/video/cx231xx/cx231xx-core.c4
-rw-r--r--linux/drivers/media/video/cx231xx/cx231xx-i2c.c3
-rw-r--r--linux/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c34
-rw-r--r--linux/drivers/media/video/cx231xx/cx231xx-video.c5
6 files changed, 213 insertions, 269 deletions
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-audio.c b/linux/drivers/media/video/cx231xx/cx231xx-audio.c
index b6f099042..0f7fb3ca7 100644
--- a/linux/drivers/media/video/cx231xx/cx231xx-audio.c
+++ b/linux/drivers/media/video/cx231xx/cx231xx-audio.c
@@ -599,7 +599,7 @@ static int cx231xx_audio_init(struct cx231xx *dev)
bEndpointAddress);
adev->num_alt = uif->num_altsetting;
- cx231xx_info(": EndPoint Addr 0x%x, Alternate settings: %i\n",
+ cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
adev->end_point_addr, adev->num_alt);
adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL);
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-cards.c b/linux/drivers/media/video/cx231xx/cx231xx-cards.c
index 31c9c93bd..d1872988a 100644
--- a/linux/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/linux/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -225,7 +225,6 @@ void cx231xx_pre_card_setup(struct cx231xx *dev)
cx231xx_info("Identified as %s (card=%d)\n",
dev->board.name, dev->model);
- cx231xx_info("Precard: Board is %s\n", dev->board.name);
/* set the direction for GPIO pins */
cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1);
cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1);
@@ -311,27 +310,11 @@ void cx231xx_card_setup(struct cx231xx *dev)
if (cx231xx_boards[dev->model].tuner_addr)
dev->tuner_addr = cx231xx_boards[dev->model].tuner_addr;
- cx231xx_info(": tuner type %d, tuner address %d \n",
- dev->tuner_type, dev->tuner_addr);
-
- /* Do card specific if any */
- switch (dev->model) {
- case CX231XX_BOARD_CNXT_RDE_250:
- /* do card specific GPIO settings if required */
- cx231xx_info("Board is Conexant RDE 250\n");
- break;
- case CX231XX_BOARD_CNXT_RDU_250:
- /* do card specific GPIO settings if required */
- cx231xx_info("Board is Conexant RDU 250\n");
- break;
- }
-
/* request some modules */
if (dev->board.decoder == CX231XX_AVDECODER) {
- cx231xx_info(": Requesting cx25840 module\n");
dev->sd_cx25840 =
v4l2_i2c_new_subdev(&dev->i2c_bus[0].i2c_adap,
- "cx25840", "cx25840", 0x88 >> 1);
+ "cx25840", "cx25840", 0x88 >> 1);
if (dev->sd_cx25840 == NULL)
cx231xx_info("cx25840 subdev registration failure\n");
cx25840_call(dev, core, init, 0);
@@ -339,7 +322,6 @@ void cx231xx_card_setup(struct cx231xx *dev)
}
if (dev->board.tuner_type != TUNER_ABSENT) {
- cx231xx_info(": Requesting Tuner module\n");
dev->sd_tuner =
v4l2_i2c_new_subdev(&dev->i2c_bus[1].i2c_adap,
"tuner", "tuner", 0xc2 >> 1);
@@ -569,16 +551,16 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
udev = usb_get_dev(interface_to_usbdev(interface));
ifnum = interface->altsetting[0].desc.bInterfaceNumber;
- printk(DRIVER_NAME ": Interface Number %d\n", ifnum);
-
- /* Interface number 0 - IR interface */
- if (ifnum == 0) {
+ if (!ifnum) {
+ /*
+ * Interface number 0 - IR interface
+ */
/* Check to see next free device and mark as used */
nr = find_first_zero_bit(&cx231xx_devused, CX231XX_MAXBOARDS);
cx231xx_devused |= 1 << nr;
if (nr >= CX231XX_MAXBOARDS) {
- cx231xx_info(": Supports only %i cx231xx boards.\n",
+ cx231xx_err(DRIVER_NAME ": Supports only %i cx231xx boards.\n",
CX231XX_MAXBOARDS);
cx231xx_devused &= ~(1 << nr);
return -ENOMEM;
@@ -611,42 +593,46 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
/* get maximum no.of IAD interfaces */
assoc_desc = udev->actconfig->intf_assoc[0];
dev->max_iad_interface_count = assoc_desc->bInterfaceCount;
- cx231xx_info("Found IAD interface count %d\n",
- dev->max_iad_interface_count);
/* init CIR module TBD */
/* store the current interface */
lif = interface;
- } else if (ifnum == 1) {
-
- /* Get dev structure first */
- dev = usb_get_intfdata(udev->actconfig->interface[0]);
- if (dev == NULL) {
- cx231xx_err(DRIVER_NAME ": out of first interface!\n");
- return -ENODEV;
+ switch (udev->speed) {
+ case USB_SPEED_LOW:
+ speed = "1.5";
+ break;
+ case USB_SPEED_UNKNOWN:
+ case USB_SPEED_FULL:
+ speed = "12";
+ break;
+ case USB_SPEED_HIGH:
+ speed = "480";
+ break;
+ default:
+ speed = "unknown";
}
- /* store the interface 0 back */
- lif = udev->actconfig->interface[0];
-
- /* increment interface count */
- dev->interface_count++;
-
- /* get device number */
- nr = dev->devno;
+ if (udev->manufacturer)
+ strlcpy(descr, udev->manufacturer, sizeof(descr));
- assoc_desc = udev->actconfig->intf_assoc[0];
- if (assoc_desc->bFirstInterface == ifnum) {
- cx231xx_info
- ("Found IAD interface match: AV Desc Start!! \n");
- } else {
- cx231xx_err(" Not found matching interface\n");
- return -ENODEV;
+ if (udev->product) {
+ if (*descr)
+ strlcat(descr, " ", sizeof(descr));
+ strlcat(descr, udev->product, sizeof(descr));
}
+ if (*descr)
+ strlcat(descr, " ", sizeof(descr));
- } else if (ifnum >= 2) {
+ cx231xx_info("New device %s@ %s Mbps "
+ "(%04x:%04x) with %d interfaces\n",
+ descr,
+ speed,
+ le16_to_cpu(udev->descriptor.idVendor),
+ le16_to_cpu(udev->descriptor.idProduct),
+ dev->max_iad_interface_count);
+ } else {
/* Get dev structure first */
dev = usb_get_intfdata(udev->actconfig->interface[0]);
if (dev == NULL) {
@@ -663,162 +649,176 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
/* get device number */
nr = dev->devno;
- /* set skip interface */
- if ((dev->interface_count - 1) != dev->max_iad_interface_count)
- skip_interface = 1; /* set skipping */
- else {
- cx231xx_info
- ("Found IAD interface no. match with AV Device no.!\n");
+ /*
+ * set skip interface, for all interfaces but
+ * interface 1 and the last one
+ */
+ if ((ifnum != 1) && ((dev->interface_count - 1)
+ != dev->max_iad_interface_count))
+ skip_interface = 1;
+
+ if (ifnum == 1) {
+ assoc_desc = udev->actconfig->intf_assoc[0];
+ if (assoc_desc->bFirstInterface != ifnum) {
+ cx231xx_err(DRIVER_NAME ": Not found "
+ "matching IAD interface\n");
+ return -ENODEV;
+ }
}
}
- switch (udev->speed) {
- case USB_SPEED_LOW:
- speed = "1.5";
- break;
- case USB_SPEED_UNKNOWN:
- case USB_SPEED_FULL:
- speed = "12";
- break;
- case USB_SPEED_HIGH:
- speed = "480";
- break;
- default:
- speed = "unknown";
- }
+ if (skip_interface)
+ return -ENODEV;
- if (udev->manufacturer)
- strlcpy(descr, udev->manufacturer, sizeof(descr));
+ cx231xx_info("registering interface %d\n", ifnum);
- if (udev->product) {
- if (*descr)
- strlcat(descr, " ", sizeof(descr));
- strlcat(descr, udev->product, sizeof(descr));
- }
- if (*descr)
- strlcat(descr, " ", sizeof(descr));
+ /* save our data pointer in this interface device */
+ usb_set_intfdata(lif, dev);
- cx231xx_info("New device %s@ %s Mbps "
- "(%04x:%04x, interface %d, class %d)\n",
- descr,
- speed,
- le16_to_cpu(udev->descriptor.idVendor),
- le16_to_cpu(udev->descriptor.idProduct),
- ifnum, interface->altsetting->desc.bInterfaceNumber);
+ if ((dev->interface_count - 1) != dev->max_iad_interface_count)
+ return 0;
- /* AV device initialization */
- if ((dev->interface_count - 1) == dev->max_iad_interface_count) {
- cx231xx_info(" Calling init_dev\n");
+ /*
+ * AV device initialization - only done at the last interface
+ */
- /* Create v4l2 device */
- snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
+ /* Create v4l2 device */
+ snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
"%s-%03d", "cx231xx", nr);
- retval = v4l2_device_register(&udev->dev, &dev->v4l2_dev);
- if (retval) {
- printk(KERN_ERR "%s() v4l2_device_register failed\n",
- __func__);
- cx231xx_devused &= ~(1 << nr);
- kfree(dev);
- return -EIO;
- }
-
- /* allocate device struct */
- retval = cx231xx_init_dev(&dev, udev, nr);
- if (retval) {
- cx231xx_devused &= ~(1 << dev->devno);
- v4l2_device_unregister(&dev->v4l2_dev);
- kfree(dev);
- return retval;
- }
+ retval = v4l2_device_register(&udev->dev, &dev->v4l2_dev);
+ if (retval) {
+ cx231xx_errdev("v4l2_device_register failed\n");
+ cx231xx_devused &= ~(1 << nr);
+ kfree(dev);
+ return -EIO;
+ }
- /* compute alternate max packet sizes for video */
- uif =
- udev->actconfig->interface[dev->current_pcb_config.
- hs_config_info[0].interface_info.
- video_index + 1];
+ /* allocate device struct */
+ retval = cx231xx_init_dev(&dev, udev, nr);
+ if (retval) {
+ cx231xx_devused &= ~(1 << dev->devno);
+ v4l2_device_unregister(&dev->v4l2_dev);
+ kfree(dev);
+ return retval;
+ }
- dev->video_mode.end_point_addr =
- le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
- bEndpointAddress);
+ /* compute alternate max packet sizes for video */
+ uif = udev->actconfig->interface[dev->current_pcb_config.
+ hs_config_info[0].interface_info.video_index + 1];
- dev->video_mode.num_alt = uif->num_altsetting;
- cx231xx_info(": EndPoint Addr 0x%x, Alternate settings: %i\n",
- dev->video_mode.end_point_addr,
- dev->video_mode.num_alt);
- dev->video_mode.alt_max_pkt_size =
- kmalloc(32 * dev->video_mode.num_alt, GFP_KERNEL);
+ dev->video_mode.end_point_addr = le16_to_cpu(uif->altsetting[0].
+ endpoint[isoc_pipe].desc.bEndpointAddress);
- if (dev->video_mode.alt_max_pkt_size == NULL) {
- cx231xx_errdev("out of memory!\n");
- cx231xx_devused &= ~(1 << nr);
- v4l2_device_unregister(&dev->v4l2_dev);
- kfree(dev);
- return -ENOMEM;
- }
+ dev->video_mode.num_alt = uif->num_altsetting;
+ cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+ dev->video_mode.end_point_addr,
+ dev->video_mode.num_alt);
+ dev->video_mode.alt_max_pkt_size =
+ kmalloc(32 * dev->video_mode.num_alt, GFP_KERNEL);
- for (i = 0; i < dev->video_mode.num_alt; i++) {
- u16 tmp =
- le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
- desc.wMaxPacketSize);
- dev->video_mode.alt_max_pkt_size[i] =
- (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
- cx231xx_info("Alternate setting %i, max size= %i\n", i,
- dev->video_mode.alt_max_pkt_size[i]);
- }
+ if (dev->video_mode.alt_max_pkt_size == NULL) {
+ cx231xx_errdev("out of memory!\n");
+ cx231xx_devused &= ~(1 << nr);
+ v4l2_device_unregister(&dev->v4l2_dev);
+ kfree(dev);
+ return -ENOMEM;
+ }
- /* compute alternate max packet sizes for vbi */
- uif =
- udev->actconfig->interface[dev->current_pcb_config.
- hs_config_info[0].interface_info.
- vanc_index + 1];
+ for (i = 0; i < dev->video_mode.num_alt; i++) {
+ u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
+ desc.wMaxPacketSize);
+ dev->video_mode.alt_max_pkt_size[i] =
+ (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+ cx231xx_info("Alternate setting %i, max size= %i\n", i,
+ dev->video_mode.alt_max_pkt_size[i]);
+ }
- dev->vbi_mode.end_point_addr =
- le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
- bEndpointAddress);
+ /* compute alternate max packet sizes for vbi */
+ uif = udev->actconfig->interface[dev->current_pcb_config.
+ hs_config_info[0].interface_info.
+ vanc_index + 1];
+
+ dev->vbi_mode.end_point_addr =
+ le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
+ bEndpointAddress);
+
+ dev->vbi_mode.num_alt = uif->num_altsetting;
+ cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+ dev->vbi_mode.end_point_addr,
+ dev->vbi_mode.num_alt);
+ dev->vbi_mode.alt_max_pkt_size =
+ kmalloc(32 * dev->vbi_mode.num_alt, GFP_KERNEL);
+
+ if (dev->vbi_mode.alt_max_pkt_size == NULL) {
+ cx231xx_errdev("out of memory!\n");
+ cx231xx_devused &= ~(1 << nr);
+ v4l2_device_unregister(&dev->v4l2_dev);
+ kfree(dev);
+ return -ENOMEM;
+ }
- dev->vbi_mode.num_alt = uif->num_altsetting;
- cx231xx_info(": EndPoint Addr 0x%x, Alternate settings: %i\n",
- dev->vbi_mode.end_point_addr,
- dev->vbi_mode.num_alt);
- dev->vbi_mode.alt_max_pkt_size =
- kmalloc(32 * dev->vbi_mode.num_alt, GFP_KERNEL);
+ for (i = 0; i < dev->vbi_mode.num_alt; i++) {
+ u16 tmp =
+ le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
+ desc.wMaxPacketSize);
+ dev->vbi_mode.alt_max_pkt_size[i] =
+ (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+ cx231xx_info("Alternate setting %i, max size= %i\n", i,
+ dev->vbi_mode.alt_max_pkt_size[i]);
+ }
- if (dev->vbi_mode.alt_max_pkt_size == NULL) {
- cx231xx_errdev("out of memory!\n");
- cx231xx_devused &= ~(1 << nr);
- v4l2_device_unregister(&dev->v4l2_dev);
- kfree(dev);
- return -ENOMEM;
- }
+ /* compute alternate max packet sizes for sliced CC */
+ uif = udev->actconfig->interface[dev->current_pcb_config.
+ hs_config_info[0].interface_info.
+ hanc_index + 1];
+
+ dev->sliced_cc_mode.end_point_addr =
+ le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
+ bEndpointAddress);
+
+ dev->sliced_cc_mode.num_alt = uif->num_altsetting;
+ cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+ dev->sliced_cc_mode.end_point_addr,
+ dev->sliced_cc_mode.num_alt);
+ dev->sliced_cc_mode.alt_max_pkt_size =
+ kmalloc(32 * dev->sliced_cc_mode.num_alt, GFP_KERNEL);
+
+ if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) {
+ cx231xx_errdev("out of memory!\n");
+ cx231xx_devused &= ~(1 << nr);
+ v4l2_device_unregister(&dev->v4l2_dev);
+ kfree(dev);
+ return -ENOMEM;
+ }
- for (i = 0; i < dev->vbi_mode.num_alt; i++) {
- u16 tmp =
- le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
- desc.wMaxPacketSize);
- dev->vbi_mode.alt_max_pkt_size[i] =
- (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
- cx231xx_info("Alternate setting %i, max size= %i\n", i,
- dev->vbi_mode.alt_max_pkt_size[i]);
- }
+ for (i = 0; i < dev->sliced_cc_mode.num_alt; i++) {
+ u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
+ desc.wMaxPacketSize);
+ dev->sliced_cc_mode.alt_max_pkt_size[i] =
+ (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+ cx231xx_info("Alternate setting %i, max size= %i\n", i,
+ dev->sliced_cc_mode.alt_max_pkt_size[i]);
+ }
- /* compute alternate max packet sizes for sliced CC */
- uif =
- udev->actconfig->interface[dev->current_pcb_config.
- hs_config_info[0].interface_info.
- hanc_index + 1];
+ if (dev->current_pcb_config.ts1_source != 0xff) {
+ /* compute alternate max packet sizes for TS1 */
+ uif = udev->actconfig->interface[dev->current_pcb_config.
+ hs_config_info[0].
+ interface_info.
+ ts1_index + 1];
- dev->sliced_cc_mode.end_point_addr =
- le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
- bEndpointAddress);
+ dev->ts1_mode.end_point_addr =
+ le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].
+ desc.bEndpointAddress);
- dev->sliced_cc_mode.num_alt = uif->num_altsetting;
- cx231xx_info(": EndPoint Addr 0x%x, Alternate settings: %i\n",
- dev->sliced_cc_mode.end_point_addr,
- dev->sliced_cc_mode.num_alt);
- dev->sliced_cc_mode.alt_max_pkt_size =
- kmalloc(32 * dev->sliced_cc_mode.num_alt, GFP_KERNEL);
+ dev->ts1_mode.num_alt = uif->num_altsetting;
+ cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+ dev->ts1_mode.end_point_addr,
+ dev->ts1_mode.num_alt);
+ dev->ts1_mode.alt_max_pkt_size =
+ kmalloc(32 * dev->ts1_mode.num_alt, GFP_KERNEL);
- if (dev->sliced_cc_mode.alt_max_pkt_size == NULL) {
+ if (dev->ts1_mode.alt_max_pkt_size == NULL) {
cx231xx_errdev("out of memory!\n");
cx231xx_devused &= ~(1 << nr);
v4l2_device_unregister(&dev->v4l2_dev);
@@ -826,74 +826,19 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
return -ENOMEM;
}
- for (i = 0; i < dev->sliced_cc_mode.num_alt; i++) {
- u16 tmp =
- le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].
- desc.wMaxPacketSize);
- dev->sliced_cc_mode.alt_max_pkt_size[i] =
- (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
- cx231xx_info("Alternate setting %i, max size= %i\n", i,
- dev->sliced_cc_mode.alt_max_pkt_size[i]);
- }
-
- if (dev->current_pcb_config.ts1_source != 0xff) {
-
- /* compute alternate max packet sizes for TS1 */
- uif =
- udev->actconfig->interface[dev->current_pcb_config.
- hs_config_info[0].
- interface_info.
- ts1_index + 1];
-
- dev->ts1_mode.end_point_addr =
- le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].
- desc.bEndpointAddress);
-
- dev->ts1_mode.num_alt = uif->num_altsetting;
- cx231xx_info
- (": EndPoint Addr 0x%x, Alternate settings: %i\n",
- dev->ts1_mode.end_point_addr,
- dev->ts1_mode.num_alt);
- dev->ts1_mode.alt_max_pkt_size =
- kmalloc(32 * dev->ts1_mode.num_alt, GFP_KERNEL);
-
- if (dev->ts1_mode.alt_max_pkt_size == NULL) {
- cx231xx_errdev("out of memory!\n");
- cx231xx_devused &= ~(1 << nr);
- v4l2_device_unregister(&dev->v4l2_dev);
- kfree(dev);
- return -ENOMEM;
- }
-
- for (i = 0; i < dev->ts1_mode.num_alt; i++) {
- u16 tmp =
- le16_to_cpu(uif->altsetting[i].
+ for (i = 0; i < dev->ts1_mode.num_alt; i++) {
+ u16 tmp = le16_to_cpu(uif->altsetting[i].
endpoint[isoc_pipe].desc.
wMaxPacketSize);
- dev->ts1_mode.alt_max_pkt_size[i] =
- (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) +
- 1);
- cx231xx_info
- ("Alternate setting %i, max size= %i\n", i,
+ dev->ts1_mode.alt_max_pkt_size[i] =
+ (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
+ cx231xx_info("Alternate setting %i, max size= %i\n", i,
dev->ts1_mode.alt_max_pkt_size[i]);
- }
}
-
}
- /* save our data pointer in this interface device */
- usb_set_intfdata(lif, dev);
-
/* load other modules required */
- if ((dev->interface_count - 1) == dev->max_iad_interface_count) {
- cx231xx_info("Calling request modules\n");
- request_modules(dev);
- }
-
- if (skip_interface) {
- cx231xx_info("Skipping the interface\n");
- return -ENODEV;
- }
+ request_modules(dev);
return 0;
}
@@ -913,6 +858,9 @@ static void cx231xx_usb_disconnect(struct usb_interface *interface)
if (!dev)
return;
+ if (!dev->udev)
+ return;
+
/* delete v4l2 device */
v4l2_device_unregister(&dev->v4l2_dev);
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-core.c b/linux/drivers/media/video/cx231xx/cx231xx-core.c
index 405819ac1..70478aa8b 100644
--- a/linux/drivers/media/video/cx231xx/cx231xx-core.c
+++ b/linux/drivers/media/video/cx231xx/cx231xx-core.c
@@ -125,7 +125,7 @@ int cx231xx_register_extension(struct cx231xx_ops *ops)
if (dev)
ops->init(dev);
}
- cx231xx_info("Cx231xx: Initialized (%s) extension\n", ops->name);
+ printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name);
mutex_unlock(&cx231xx_extension_devlist_lock);
mutex_unlock(&cx231xx_devlist_mutex);
return 0;
@@ -143,7 +143,7 @@ void cx231xx_unregister_extension(struct cx231xx_ops *ops)
}
mutex_lock(&cx231xx_extension_devlist_lock);
- cx231xx_info("Cx231xx: Removed (%s) extension\n", ops->name);
+ printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name);
list_del(&ops->next);
mutex_unlock(&cx231xx_extension_devlist_lock);
mutex_unlock(&cx231xx_devlist_mutex);
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-i2c.c b/linux/drivers/media/video/cx231xx/cx231xx-i2c.c
index c87203f80..d196fe666 100644
--- a/linux/drivers/media/video/cx231xx/cx231xx-i2c.c
+++ b/linux/drivers/media/video/cx231xx/cx231xx-i2c.c
@@ -521,8 +521,6 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
BUG_ON(!dev->cx231xx_send_usb_command);
- cx231xx_info("%s(bus = %d)\n", __func__, bus->nr);
-
memcpy(&bus->i2c_adap, &cx231xx_adap_template, sizeof(bus->i2c_adap));
memcpy(&bus->i2c_algo, &cx231xx_algo, sizeof(bus->i2c_algo));
memcpy(&bus->i2c_client, &cx231xx_client_template,
@@ -540,7 +538,6 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
bus->i2c_client.adapter = &bus->i2c_adap;
if (0 == bus->i2c_rc) {
- cx231xx_info("%s: i2c bus %d registered\n", dev->name, bus->nr);
if (i2c_scan)
cx231xx_do_i2c_scan(dev, &bus->i2c_client);
} else
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c b/linux/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c
index c00f51eae..7473c33e8 100644
--- a/linux/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c
+++ b/linux/drivers/media/video/cx231xx/cx231xx-pcb-cfg.c
@@ -22,6 +22,10 @@
#include "cx231xx.h"
#include "cx231xx-conf-reg.h"
+static unsigned int pcb_debug;
+module_param(pcb_debug, int, 0644);
+MODULE_PARM_DESC(pcb_debug, "enable pcb config debug messages [video]");
+
/******************************************************************************/
struct pcb_config cx231xx_Scenario[] = {
@@ -659,11 +663,8 @@ u32 initialize_cx231xx(struct cx231xx *dev)
u32 ts1_source = 0;
u32 ts2_source = 0;
u32 analog_source = 0;
- u8 tmp = 0;
u8 _current_scenario_idx = 0xff;
- cx231xx_info("PcbConfig::initialize \n");
-
ts1_source = SOURCE_TS_BDA;
ts2_source = SOURCE_TS_BDA;
@@ -672,7 +673,6 @@ u32 initialize_cx231xx(struct cx231xx *dev)
cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, data, 4);
config_info = *((u32 *) data);
- cx231xx_info("SC(0x00) register = 0x%x\n", config_info);
usb_speed = (u8) (config_info & 0x1);
/* Verify this device belongs to Bus power or Self power device */
@@ -776,18 +776,20 @@ u32 initialize_cx231xx(struct cx231xx *dev)
memcpy(&dev->current_pcb_config, p_pcb_info,
sizeof(struct pcb_config));
- /*******************************************************************/
- tmp = (dev->current_pcb_config.index) + 1;
-
- cx231xx_info("scenario %d\n", tmp);
- cx231xx_info("type=%x\n", dev->current_pcb_config.type);
- cx231xx_info("mode=%x\n", dev->current_pcb_config.mode);
- cx231xx_info("speed=%x\n", dev->current_pcb_config.speed);
- cx231xx_info("ts1_source=%x\n", dev->current_pcb_config.ts1_source);
- cx231xx_info("ts2_source=%x\n", dev->current_pcb_config.ts2_source);
- cx231xx_info("analog_source=%x\n",
- dev->current_pcb_config.analog_source);
- /*******************************************************************/
+ if (pcb_debug) {
+ cx231xx_info("SC(0x00) register = 0x%x\n", config_info);
+ cx231xx_info("scenario %d\n",
+ (dev->current_pcb_config.index) + 1);
+ cx231xx_info("type=%x\n", dev->current_pcb_config.type);
+ cx231xx_info("mode=%x\n", dev->current_pcb_config.mode);
+ cx231xx_info("speed=%x\n", dev->current_pcb_config.speed);
+ cx231xx_info("ts1_source=%x\n",
+ dev->current_pcb_config.ts1_source);
+ cx231xx_info("ts2_source=%x\n",
+ dev->current_pcb_config.ts2_source);
+ cx231xx_info("analog_source=%x\n",
+ dev->current_pcb_config.analog_source);
+ }
return 0;
}
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-video.c b/linux/drivers/media/video/cx231xx/cx231xx-video.c
index 144eb9dd7..d53ddcb6a 100644
--- a/linux/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/linux/drivers/media/video/cx231xx/cx231xx-video.c
@@ -1640,8 +1640,7 @@ static int vidioc_querycap(struct file *file, void *priv,
strlcpy(cap->driver, "cx231xx", sizeof(cap->driver));
strlcpy(cap->card, cx231xx_boards[dev->model].name, sizeof(cap->card));
- strlcpy(cap->bus_info, dev->v4l2_dev.name,
- sizeof(cap->bus_info));
+ usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
cap->version = CX231XX_VERSION_CODE;
@@ -2353,8 +2352,6 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
{
int ret;
- cx231xx_info("%s()\n", __func__);
-
cx231xx_info("%s: v4l2 driver version %d.%d.%d\n",
dev->name,
(CX231XX_VERSION_CODE >> 16) & 0xff,