aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/gspca/mr97310a.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c
index 8190a1d4dc84..169cdb65c14a 100644
--- a/drivers/media/video/gspca/mr97310a.c
+++ b/drivers/media/video/gspca/mr97310a.c
@@ -57,6 +57,11 @@ MODULE_AUTHOR("Kyle Guinn <elyk03@gmail.com>,"
57MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver"); 57MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver");
58MODULE_LICENSE("GPL"); 58MODULE_LICENSE("GPL");
59 59
60/* global parameters */
61int force_sensor_type = -1;
62module_param(force_sensor_type, int, 0644);
63MODULE_PARM_DESC(force_sensor_type, "Force sensor type (-1 (auto), 0 or 1)");
64
60/* specific webcam descriptor */ 65/* specific webcam descriptor */
61struct sd { 66struct sd {
62 struct gspca_dev gspca_dev; /* !! must be the first item */ 67 struct gspca_dev gspca_dev; /* !! must be the first item */
@@ -401,6 +406,12 @@ static int sd_config(struct gspca_dev *gspca_dev,
401 PDEBUG(D_PROBE, "MR97310A CIF camera detected, sensor: %d", 406 PDEBUG(D_PROBE, "MR97310A CIF camera detected, sensor: %d",
402 sd->sensor_type); 407 sd->sensor_type);
403 408
409 if (force_sensor_type != -1) {
410 sd->sensor_type = !! force_sensor_type;
411 PDEBUG(D_PROBE, "Forcing sensor type to: %d",
412 sd->sensor_type);
413 }
414
404 if (sd->sensor_type == 0) 415 if (sd->sensor_type == 0)
405 gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX); 416 gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX);
406 } else { 417 } else {
@@ -606,6 +617,12 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
606 msleep(200); 617 msleep(200);
607 } 618 }
608 619
620 if (force_sensor_type != -1) {
621 sd->sensor_type = !! force_sensor_type;
622 PDEBUG(D_PROBE, "Forcing sensor type to: %d",
623 sd->sensor_type);
624 }
625
609 /* 626 /*
610 * Known VGA cameras. 627 * Known VGA cameras.
611 * This test is only run if the previous test returned 0x30, but 628 * This test is only run if the previous test returned 0x30, but