aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
authorJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
committerJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
commita215aa7b9ab3759c047201199fba64d3042d7f13 (patch)
treebca37493d9b2233450e6d3ffced1261d0e4f71fe /drivers/media/video/gspca/sonixj.c
parentd31199a77ef606f1d06894385f1852181ba6136b (diff)
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'drivers/media/video/gspca/sonixj.c')
-rw-r--r--drivers/media/video/gspca/sonixj.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 370544361be2..248c2e62b278 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -56,6 +56,7 @@ struct sd {
56 u8 jpegqual; /* webcam quality */ 56 u8 jpegqual; /* webcam quality */
57 57
58 u8 reg18; 58 u8 reg18;
59 u8 flags;
59 60
60 s8 ag_cnt; 61 s8 ag_cnt;
61#define AG_CNT_START 13 62#define AG_CNT_START 13
@@ -87,6 +88,9 @@ enum sensors {
87 SENSOR_SP80708, 88 SENSOR_SP80708,
88}; 89};
89 90
91/* device flags */
92#define PDN_INV 1 /* inverse pin S_PWR_DN / sn_xxx tables */
93
90/* V4L2 controls supported by the driver */ 94/* V4L2 controls supported by the driver */
91static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); 95static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
92static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); 96static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
@@ -1777,7 +1781,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
1777 struct cam *cam; 1781 struct cam *cam;
1778 1782
1779 sd->bridge = id->driver_info >> 16; 1783 sd->bridge = id->driver_info >> 16;
1780 sd->sensor = id->driver_info; 1784 sd->sensor = id->driver_info >> 8;
1785 sd->flags = id->driver_info;
1781 1786
1782 cam = &gspca_dev->cam; 1787 cam = &gspca_dev->cam;
1783 if (sd->sensor == SENSOR_ADCM1700) { 1788 if (sd->sensor == SENSOR_ADCM1700) {
@@ -2474,8 +2479,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
2474 reg1 = 0x44; 2479 reg1 = 0x44;
2475 reg17 = 0xa2; 2480 reg17 = 0xa2;
2476 break; 2481 break;
2477 default: 2482 case SENSOR_SP80708:
2478/* case SENSOR_SP80708: */
2479 init = sp80708_sensor_param1; 2483 init = sp80708_sensor_param1;
2480 if (mode) { 2484 if (mode) {
2481/*?? reg1 = 0x04; * 320 clk 48Mhz */ 2485/*?? reg1 = 0x04; * 320 clk 48Mhz */
@@ -2985,14 +2989,18 @@ static const struct sd_desc sd_desc = {
2985/* -- module initialisation -- */ 2989/* -- module initialisation -- */
2986#define BS(bridge, sensor) \ 2990#define BS(bridge, sensor) \
2987 .driver_info = (BRIDGE_ ## bridge << 16) \ 2991 .driver_info = (BRIDGE_ ## bridge << 16) \
2988 | SENSOR_ ## sensor 2992 | (SENSOR_ ## sensor << 8)
2993#define BSF(bridge, sensor, flags) \
2994 .driver_info = (BRIDGE_ ## bridge << 16) \
2995 | (SENSOR_ ## sensor << 8) \
2996 | (flags)
2989static const __devinitdata struct usb_device_id device_table[] = { 2997static const __devinitdata struct usb_device_id device_table[] = {
2990#if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE 2998#if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
2991 {USB_DEVICE(0x0458, 0x7025), BS(SN9C120, MI0360)}, 2999 {USB_DEVICE(0x0458, 0x7025), BS(SN9C120, MI0360)},
2992 {USB_DEVICE(0x0458, 0x702e), BS(SN9C120, OV7660)}, 3000 {USB_DEVICE(0x0458, 0x702e), BS(SN9C120, OV7660)},
2993#endif 3001#endif
2994 {USB_DEVICE(0x045e, 0x00f5), BS(SN9C105, OV7660)}, 3002 {USB_DEVICE(0x045e, 0x00f5), BSF(SN9C105, OV7660, PDN_INV)},
2995 {USB_DEVICE(0x045e, 0x00f7), BS(SN9C105, OV7660)}, 3003 {USB_DEVICE(0x045e, 0x00f7), BSF(SN9C105, OV7660, PDN_INV)},
2996 {USB_DEVICE(0x0471, 0x0327), BS(SN9C105, MI0360)}, 3004 {USB_DEVICE(0x0471, 0x0327), BS(SN9C105, MI0360)},
2997 {USB_DEVICE(0x0471, 0x0328), BS(SN9C105, MI0360)}, 3005 {USB_DEVICE(0x0471, 0x0328), BS(SN9C105, MI0360)},
2998 {USB_DEVICE(0x0471, 0x0330), BS(SN9C105, MI0360)}, 3006 {USB_DEVICE(0x0471, 0x0330), BS(SN9C105, MI0360)},