diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-10-19 03:29:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 12:50:06 -0400 |
commit | 780e312175f688ab5ab6124c91d46fa2b9afe2d2 (patch) | |
tree | 3830f521b82765b0cfa71e7bb1a4a617091d685f /drivers | |
parent | 76ad3b684ae6bf43662f8fc57501e4ad0e3b12e8 (diff) |
[media] gspca: Fix coding style issues
The errors were found by checkpatch.pl. Most fixes are:
- remove spaces followed by TAB(s),
- split lines greater than 80 characters,
- move most '{'s from start of line to end of previous line.
(Some '{'s at start of line remain when the '}'s are on the same line)
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
34 files changed, 285 insertions, 312 deletions
diff --git a/drivers/media/video/gspca/benq.c b/drivers/media/video/gspca/benq.c index ca15be058e6e..629043933501 100644 --- a/drivers/media/video/gspca/benq.c +++ b/drivers/media/video/gspca/benq.c | |||
@@ -152,7 +152,8 @@ static void sd_stopN(struct gspca_dev *gspca_dev) | |||
152 | reg_w(gspca_dev, 0x003c, 0x0005); | 152 | reg_w(gspca_dev, 0x003c, 0x0005); |
153 | reg_w(gspca_dev, 0x003c, 0x0006); | 153 | reg_w(gspca_dev, 0x003c, 0x0006); |
154 | reg_w(gspca_dev, 0x003c, 0x0007); | 154 | reg_w(gspca_dev, 0x003c, 0x0007); |
155 | usb_set_interface(gspca_dev->dev, gspca_dev->iface, gspca_dev->nbalt - 1); | 155 | usb_set_interface(gspca_dev->dev, gspca_dev->iface, |
156 | gspca_dev->nbalt - 1); | ||
156 | } | 157 | } |
157 | 158 | ||
158 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, | 159 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c index 370a17792376..1eacb6c7926d 100644 --- a/drivers/media/video/gspca/conex.c +++ b/drivers/media/video/gspca/conex.c | |||
@@ -687,7 +687,7 @@ static void cx11646_jpeg(struct gspca_dev*gspca_dev) | |||
687 | reg_w_val(gspca_dev, 0x00c0, 0x00); | 687 | reg_w_val(gspca_dev, 0x00c0, 0x00); |
688 | reg_r(gspca_dev, 0x0001, 1); | 688 | reg_r(gspca_dev, 0x0001, 1); |
689 | length = 8; | 689 | length = 8; |
690 | switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv) { | 690 | switch (gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv) { |
691 | case 0: | 691 | case 0: |
692 | for (i = 0; i < 27; i++) { | 692 | for (i = 0; i < 27; i++) { |
693 | if (i == 26) | 693 | if (i == 26) |
@@ -901,7 +901,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
901 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); | 901 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
902 | } | 902 | } |
903 | 903 | ||
904 | static void setbrightness(struct gspca_dev*gspca_dev) | 904 | static void setbrightness(struct gspca_dev *gspca_dev) |
905 | { | 905 | { |
906 | struct sd *sd = (struct sd *) gspca_dev; | 906 | struct sd *sd = (struct sd *) gspca_dev; |
907 | __u8 regE5cbx[] = { 0x88, 0x00, 0xd4, 0x01, 0x88, 0x01, 0x01, 0x01 }; | 907 | __u8 regE5cbx[] = { 0x88, 0x00, 0xd4, 0x01, 0x88, 0x01, 0x01, 0x01 }; |
@@ -924,7 +924,7 @@ static void setbrightness(struct gspca_dev*gspca_dev) | |||
924 | reg_w_val(gspca_dev, 0x0070, reg70); | 924 | reg_w_val(gspca_dev, 0x0070, reg70); |
925 | } | 925 | } |
926 | 926 | ||
927 | static void setcontrast(struct gspca_dev*gspca_dev) | 927 | static void setcontrast(struct gspca_dev *gspca_dev) |
928 | { | 928 | { |
929 | struct sd *sd = (struct sd *) gspca_dev; | 929 | struct sd *sd = (struct sd *) gspca_dev; |
930 | __u8 regE5acx[] = { 0x88, 0x0a, 0x0c, 0x01 }; /* seem MSB */ | 930 | __u8 regE5acx[] = { 0x88, 0x0a, 0x0c, 0x01 }; /* seem MSB */ |
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c index ff7e509f943b..a594b36d6199 100644 --- a/drivers/media/video/gspca/etoms.c +++ b/drivers/media/video/gspca/etoms.c | |||
@@ -710,9 +710,9 @@ static void Et_setgainG(struct gspca_dev *gspca_dev, __u8 gain) | |||
710 | } | 710 | } |
711 | 711 | ||
712 | #define BLIMIT(bright) \ | 712 | #define BLIMIT(bright) \ |
713 | (__u8)((bright > 0x1f)?0x1f:((bright < 4)?3:bright)) | 713 | (u8)((bright > 0x1f) ? 0x1f : ((bright < 4) ? 3 : bright)) |
714 | #define LIMIT(color) \ | 714 | #define LIMIT(color) \ |
715 | (unsigned char)((color > 0xff)?0xff:((color < 0)?0:color)) | 715 | (u8)((color > 0xff) ? 0xff : ((color < 0) ? 0 : color)) |
716 | 716 | ||
717 | static void do_autogain(struct gspca_dev *gspca_dev) | 717 | static void do_autogain(struct gspca_dev *gspca_dev) |
718 | { | 718 | { |
diff --git a/drivers/media/video/gspca/gl860/gl860-mi2020.c b/drivers/media/video/gspca/gl860/gl860-mi2020.c index 57782e011c9e..2edda6b7d653 100644 --- a/drivers/media/video/gspca/gl860/gl860-mi2020.c +++ b/drivers/media/video/gspca/gl860/gl860-mi2020.c | |||
@@ -69,15 +69,15 @@ static u8 dat_multi5[] = { 0x8c, 0xa1, 0x03 }; | |||
69 | static u8 dat_multi6[] = { 0x90, 0x00, 0x05 }; | 69 | static u8 dat_multi6[] = { 0x90, 0x00, 0x05 }; |
70 | 70 | ||
71 | static struct validx tbl_init_at_startup[] = { | 71 | static struct validx tbl_init_at_startup[] = { |
72 | {0x0000, 0x0000}, {0x0010, 0x0010}, {0x0008, 0x00c0}, {0x0001,0x00c1}, | 72 | {0x0000, 0x0000}, {0x0010, 0x0010}, {0x0008, 0x00c0}, {0x0001, 0x00c1}, |
73 | {0x0001, 0x00c2}, {0x0020, 0x0006}, {0x006a, 0x000d}, | 73 | {0x0001, 0x00c2}, {0x0020, 0x0006}, {0x006a, 0x000d}, |
74 | {53, 0xffff}, | 74 | {53, 0xffff}, |
75 | {0x0040, 0x0000}, {0x0063, 0x0006}, | 75 | {0x0040, 0x0000}, {0x0063, 0x0006}, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static struct validx tbl_common_0B[] = { | 78 | static struct validx tbl_common_0B[] = { |
79 | {0x0002, 0x0004}, {0x006a, 0x0007}, {0x00ef, 0x0006}, {0x006a,0x000d}, | 79 | {0x0002, 0x0004}, {0x006a, 0x0007}, {0x00ef, 0x0006}, {0x006a, 0x000d}, |
80 | {0x0000, 0x00c0}, {0x0010, 0x0010}, {0x0003, 0x00c1}, {0x0042,0x00c2}, | 80 | {0x0000, 0x00c0}, {0x0010, 0x0010}, {0x0003, 0x00c1}, {0x0042, 0x00c2}, |
81 | {0x0004, 0x00d8}, {0x0000, 0x0058}, {0x0041, 0x0000}, | 81 | {0x0004, 0x00d8}, {0x0000, 0x0058}, {0x0041, 0x0000}, |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index c64299d0b889..8fe8fb486d62 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -1358,7 +1358,7 @@ static int vidioc_queryctrl(struct file *file, void *priv, | |||
1358 | continue; | 1358 | continue; |
1359 | if (idx >= 0 | 1359 | if (idx >= 0 |
1360 | && gspca_dev->sd_desc->ctrls[i].qctrl.id | 1360 | && gspca_dev->sd_desc->ctrls[i].qctrl.id |
1361 | > gspca_dev->sd_desc->ctrls[idx].qctrl.id) | 1361 | > gspca_dev->sd_desc->ctrls[idx].qctrl.id) |
1362 | continue; | 1362 | continue; |
1363 | idx = i; | 1363 | idx = i; |
1364 | } | 1364 | } |
diff --git a/drivers/media/video/gspca/konica.c b/drivers/media/video/gspca/konica.c index f3fe33c23824..d2ce65dcbfdc 100644 --- a/drivers/media/video/gspca/konica.c +++ b/drivers/media/video/gspca/konica.c | |||
@@ -89,7 +89,7 @@ static const struct ctrl sd_ctrls[] = { | |||
89 | { | 89 | { |
90 | .id = V4L2_CID_CONTRAST, | 90 | .id = V4L2_CID_CONTRAST, |
91 | .type = V4L2_CTRL_TYPE_INTEGER, | 91 | .type = V4L2_CTRL_TYPE_INTEGER, |
92 | .name = "contrast", | 92 | .name = "Contrast", |
93 | .minimum = 0, | 93 | .minimum = 0, |
94 | .maximum = 9, | 94 | .maximum = 9, |
95 | .step = 4, | 95 | .step = 4, |
@@ -121,7 +121,7 @@ static const struct ctrl sd_ctrls[] = { | |||
121 | { | 121 | { |
122 | .id = V4L2_CID_WHITE_BALANCE_TEMPERATURE, | 122 | .id = V4L2_CID_WHITE_BALANCE_TEMPERATURE, |
123 | .type = V4L2_CTRL_TYPE_INTEGER, | 123 | .type = V4L2_CTRL_TYPE_INTEGER, |
124 | .name = "Whitebalance ", | 124 | .name = "White Balance", |
125 | .minimum = 0, | 125 | .minimum = 0, |
126 | .maximum = 33, | 126 | .maximum = 33, |
127 | .step = 1, | 127 | .step = 1, |
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c index c0722fa64606..0d605a52b924 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.c | |||
@@ -109,14 +109,14 @@ static const struct ctrl mt9m111_ctrls[] = { | |||
109 | #define GREEN_BALANCE_IDX 4 | 109 | #define GREEN_BALANCE_IDX 4 |
110 | { | 110 | { |
111 | { | 111 | { |
112 | .id = M5602_V4L2_CID_GREEN_BALANCE, | 112 | .id = M5602_V4L2_CID_GREEN_BALANCE, |
113 | .type = V4L2_CTRL_TYPE_INTEGER, | 113 | .type = V4L2_CTRL_TYPE_INTEGER, |
114 | .name = "green balance", | 114 | .name = "green balance", |
115 | .minimum = 0x00, | 115 | .minimum = 0x00, |
116 | .maximum = 0x7ff, | 116 | .maximum = 0x7ff, |
117 | .step = 0x1, | 117 | .step = 0x1, |
118 | .default_value = MT9M111_GREEN_GAIN_DEFAULT, | 118 | .default_value = MT9M111_GREEN_GAIN_DEFAULT, |
119 | .flags = V4L2_CTRL_FLAG_SLIDER | 119 | .flags = V4L2_CTRL_FLAG_SLIDER |
120 | }, | 120 | }, |
121 | .set = mt9m111_set_green_balance, | 121 | .set = mt9m111_set_green_balance, |
122 | .get = mt9m111_get_green_balance | 122 | .get = mt9m111_get_green_balance |
@@ -124,14 +124,14 @@ static const struct ctrl mt9m111_ctrls[] = { | |||
124 | #define BLUE_BALANCE_IDX 5 | 124 | #define BLUE_BALANCE_IDX 5 |
125 | { | 125 | { |
126 | { | 126 | { |
127 | .id = V4L2_CID_BLUE_BALANCE, | 127 | .id = V4L2_CID_BLUE_BALANCE, |
128 | .type = V4L2_CTRL_TYPE_INTEGER, | 128 | .type = V4L2_CTRL_TYPE_INTEGER, |
129 | .name = "blue balance", | 129 | .name = "blue balance", |
130 | .minimum = 0x00, | 130 | .minimum = 0x00, |
131 | .maximum = 0x7ff, | 131 | .maximum = 0x7ff, |
132 | .step = 0x1, | 132 | .step = 0x1, |
133 | .default_value = MT9M111_BLUE_GAIN_DEFAULT, | 133 | .default_value = MT9M111_BLUE_GAIN_DEFAULT, |
134 | .flags = V4L2_CTRL_FLAG_SLIDER | 134 | .flags = V4L2_CTRL_FLAG_SLIDER |
135 | }, | 135 | }, |
136 | .set = mt9m111_set_blue_balance, | 136 | .set = mt9m111_set_blue_balance, |
137 | .get = mt9m111_get_blue_balance | 137 | .get = mt9m111_get_blue_balance |
@@ -139,14 +139,14 @@ static const struct ctrl mt9m111_ctrls[] = { | |||
139 | #define RED_BALANCE_IDX 5 | 139 | #define RED_BALANCE_IDX 5 |
140 | { | 140 | { |
141 | { | 141 | { |
142 | .id = V4L2_CID_RED_BALANCE, | 142 | .id = V4L2_CID_RED_BALANCE, |
143 | .type = V4L2_CTRL_TYPE_INTEGER, | 143 | .type = V4L2_CTRL_TYPE_INTEGER, |
144 | .name = "red balance", | 144 | .name = "red balance", |
145 | .minimum = 0x00, | 145 | .minimum = 0x00, |
146 | .maximum = 0x7ff, | 146 | .maximum = 0x7ff, |
147 | .step = 0x1, | 147 | .step = 0x1, |
148 | .default_value = MT9M111_RED_GAIN_DEFAULT, | 148 | .default_value = MT9M111_RED_GAIN_DEFAULT, |
149 | .flags = V4L2_CTRL_FLAG_SLIDER | 149 | .flags = V4L2_CTRL_FLAG_SLIDER |
150 | }, | 150 | }, |
151 | .set = mt9m111_set_red_balance, | 151 | .set = mt9m111_set_red_balance, |
152 | .get = mt9m111_get_red_balance | 152 | .get = mt9m111_get_red_balance |
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h index b3de77823091..b1f0c492036a 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h | |||
@@ -70,7 +70,7 @@ | |||
70 | #define MT9M111_COLORPIPE 0x01 | 70 | #define MT9M111_COLORPIPE 0x01 |
71 | #define MT9M111_CAMERA_CONTROL 0x02 | 71 | #define MT9M111_CAMERA_CONTROL 0x02 |
72 | 72 | ||
73 | #define MT9M111_RESET (1 << 0) | 73 | #define MT9M111_RESET (1 << 0) |
74 | #define MT9M111_RESTART (1 << 1) | 74 | #define MT9M111_RESTART (1 << 1) |
75 | #define MT9M111_ANALOG_STANDBY (1 << 2) | 75 | #define MT9M111_ANALOG_STANDBY (1 << 2) |
76 | #define MT9M111_CHIP_ENABLE (1 << 3) | 76 | #define MT9M111_CHIP_ENABLE (1 << 3) |
@@ -97,7 +97,7 @@ | |||
97 | #define MT9M111_2D_DEFECT_CORRECTION_ENABLE (1 << 0) | 97 | #define MT9M111_2D_DEFECT_CORRECTION_ENABLE (1 << 0) |
98 | 98 | ||
99 | #define INITIAL_MAX_GAIN 64 | 99 | #define INITIAL_MAX_GAIN 64 |
100 | #define MT9M111_DEFAULT_GAIN 283 | 100 | #define MT9M111_DEFAULT_GAIN 283 |
101 | #define MT9M111_GREEN_GAIN_DEFAULT 0x20 | 101 | #define MT9M111_GREEN_GAIN_DEFAULT 0x20 |
102 | #define MT9M111_BLUE_GAIN_DEFAULT 0x20 | 102 | #define MT9M111_BLUE_GAIN_DEFAULT 0x20 |
103 | #define MT9M111_RED_GAIN_DEFAULT 0x20 | 103 | #define MT9M111_RED_GAIN_DEFAULT 0x20 |
@@ -125,8 +125,7 @@ static const struct m5602_sensor mt9m111 = { | |||
125 | .start = mt9m111_start, | 125 | .start = mt9m111_start, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static const unsigned char preinit_mt9m111[][4] = | 128 | static const unsigned char preinit_mt9m111[][4] = { |
129 | { | ||
130 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | 129 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, |
131 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | 130 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, |
132 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | 131 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
@@ -165,8 +164,7 @@ static const unsigned char preinit_mt9m111[][4] = | |||
165 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00} | 164 | {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00} |
166 | }; | 165 | }; |
167 | 166 | ||
168 | static const unsigned char init_mt9m111[][4] = | 167 | static const unsigned char init_mt9m111[][4] = { |
169 | { | ||
170 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | 168 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, |
171 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | 169 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, |
172 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | 170 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
@@ -257,8 +255,7 @@ static const unsigned char init_mt9m111[][4] = | |||
257 | {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90}, | 255 | {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90}, |
258 | }; | 256 | }; |
259 | 257 | ||
260 | static const unsigned char start_mt9m111[][4] = | 258 | static const unsigned char start_mt9m111[][4] = { |
261 | { | ||
262 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, | 259 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, |
263 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | 260 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, |
264 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | 261 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, |
@@ -271,5 +268,4 @@ static const unsigned char start_mt9m111[][4] = | |||
271 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | 268 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, |
272 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, | 269 | {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, |
273 | }; | 270 | }; |
274 | |||
275 | #endif | 271 | #endif |
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c index 62c1cbf06666..b12f60464b3b 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov7660.c +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c | |||
@@ -54,13 +54,13 @@ static const struct ctrl ov7660_ctrls[] = { | |||
54 | #define AUTO_WHITE_BALANCE_IDX 4 | 54 | #define AUTO_WHITE_BALANCE_IDX 4 |
55 | { | 55 | { |
56 | { | 56 | { |
57 | .id = V4L2_CID_AUTO_WHITE_BALANCE, | 57 | .id = V4L2_CID_AUTO_WHITE_BALANCE, |
58 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 58 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
59 | .name = "auto white balance", | 59 | .name = "auto white balance", |
60 | .minimum = 0, | 60 | .minimum = 0, |
61 | .maximum = 1, | 61 | .maximum = 1, |
62 | .step = 1, | 62 | .step = 1, |
63 | .default_value = 1 | 63 | .default_value = 1 |
64 | }, | 64 | }, |
65 | .set = ov7660_set_auto_white_balance, | 65 | .set = ov7660_set_auto_white_balance, |
66 | .get = ov7660_get_auto_white_balance | 66 | .get = ov7660_get_auto_white_balance |
@@ -68,13 +68,13 @@ static const struct ctrl ov7660_ctrls[] = { | |||
68 | #define AUTO_GAIN_CTRL_IDX 5 | 68 | #define AUTO_GAIN_CTRL_IDX 5 |
69 | { | 69 | { |
70 | { | 70 | { |
71 | .id = V4L2_CID_AUTOGAIN, | 71 | .id = V4L2_CID_AUTOGAIN, |
72 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 72 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
73 | .name = "auto gain control", | 73 | .name = "auto gain control", |
74 | .minimum = 0, | 74 | .minimum = 0, |
75 | .maximum = 1, | 75 | .maximum = 1, |
76 | .step = 1, | 76 | .step = 1, |
77 | .default_value = 1 | 77 | .default_value = 1 |
78 | }, | 78 | }, |
79 | .set = ov7660_set_auto_gain, | 79 | .set = ov7660_set_auto_gain, |
80 | .get = ov7660_get_auto_gain | 80 | .get = ov7660_get_auto_gain |
@@ -82,13 +82,13 @@ static const struct ctrl ov7660_ctrls[] = { | |||
82 | #define AUTO_EXPOSURE_IDX 6 | 82 | #define AUTO_EXPOSURE_IDX 6 |
83 | { | 83 | { |
84 | { | 84 | { |
85 | .id = V4L2_CID_EXPOSURE_AUTO, | 85 | .id = V4L2_CID_EXPOSURE_AUTO, |
86 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 86 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
87 | .name = "auto exposure", | 87 | .name = "auto exposure", |
88 | .minimum = 0, | 88 | .minimum = 0, |
89 | .maximum = 1, | 89 | .maximum = 1, |
90 | .step = 1, | 90 | .step = 1, |
91 | .default_value = 1 | 91 | .default_value = 1 |
92 | }, | 92 | }, |
93 | .set = ov7660_set_auto_exposure, | 93 | .set = ov7660_set_auto_exposure, |
94 | .get = ov7660_get_auto_exposure | 94 | .get = ov7660_get_auto_exposure |
@@ -96,13 +96,13 @@ static const struct ctrl ov7660_ctrls[] = { | |||
96 | #define HFLIP_IDX 7 | 96 | #define HFLIP_IDX 7 |
97 | { | 97 | { |
98 | { | 98 | { |
99 | .id = V4L2_CID_HFLIP, | 99 | .id = V4L2_CID_HFLIP, |
100 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 100 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
101 | .name = "horizontal flip", | 101 | .name = "horizontal flip", |
102 | .minimum = 0, | 102 | .minimum = 0, |
103 | .maximum = 1, | 103 | .maximum = 1, |
104 | .step = 1, | 104 | .step = 1, |
105 | .default_value = 0 | 105 | .default_value = 0 |
106 | }, | 106 | }, |
107 | .set = ov7660_set_hflip, | 107 | .set = ov7660_set_hflip, |
108 | .get = ov7660_get_hflip | 108 | .get = ov7660_get_hflip |
@@ -110,13 +110,13 @@ static const struct ctrl ov7660_ctrls[] = { | |||
110 | #define VFLIP_IDX 8 | 110 | #define VFLIP_IDX 8 |
111 | { | 111 | { |
112 | { | 112 | { |
113 | .id = V4L2_CID_VFLIP, | 113 | .id = V4L2_CID_VFLIP, |
114 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 114 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
115 | .name = "vertical flip", | 115 | .name = "vertical flip", |
116 | .minimum = 0, | 116 | .minimum = 0, |
117 | .maximum = 1, | 117 | .maximum = 1, |
118 | .step = 1, | 118 | .step = 1, |
119 | .default_value = 0 | 119 | .default_value = 0 |
120 | }, | 120 | }, |
121 | .set = ov7660_set_vflip, | 121 | .set = ov7660_set_vflip, |
122 | .get = ov7660_get_vflip | 122 | .get = ov7660_get_vflip |
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.h b/drivers/media/video/gspca/m5602/m5602_ov7660.h index 4d9dcf29da2e..2efd607987ec 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov7660.h +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.h | |||
@@ -80,7 +80,7 @@ | |||
80 | 80 | ||
81 | #define OV7660_DEFAULT_GAIN 0x0e | 81 | #define OV7660_DEFAULT_GAIN 0x0e |
82 | #define OV7660_DEFAULT_RED_GAIN 0x80 | 82 | #define OV7660_DEFAULT_RED_GAIN 0x80 |
83 | #define OV7660_DEFAULT_BLUE_GAIN 0x80 | 83 | #define OV7660_DEFAULT_BLUE_GAIN 0x80 |
84 | #define OV7660_DEFAULT_SATURATION 0x00 | 84 | #define OV7660_DEFAULT_SATURATION 0x00 |
85 | #define OV7660_DEFAULT_EXPOSURE 0x20 | 85 | #define OV7660_DEFAULT_EXPOSURE 0x20 |
86 | 86 | ||
@@ -105,8 +105,7 @@ static const struct m5602_sensor ov7660 = { | |||
105 | .disconnect = ov7660_disconnect, | 105 | .disconnect = ov7660_disconnect, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static const unsigned char preinit_ov7660[][4] = | 108 | static const unsigned char preinit_ov7660[][4] = { |
109 | { | ||
110 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | 109 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, |
111 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | 110 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, |
112 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | 111 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, |
@@ -140,8 +139,7 @@ static const unsigned char preinit_ov7660[][4] = | |||
140 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00} | 139 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00} |
141 | }; | 140 | }; |
142 | 141 | ||
143 | static const unsigned char init_ov7660[][4] = | 142 | static const unsigned char init_ov7660[][4] = { |
144 | { | ||
145 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | 143 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, |
146 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | 144 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, |
147 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | 145 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, |
@@ -259,5 +257,4 @@ static const unsigned char init_ov7660[][4] = | |||
259 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | 257 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, |
260 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, | 258 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, |
261 | }; | 259 | }; |
262 | |||
263 | #endif | 260 | #endif |
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c index 069ba0044f8b..8ded8b100576 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c | |||
@@ -121,8 +121,8 @@ static const struct ctrl ov9650_ctrls[] = { | |||
121 | .minimum = 0x00, | 121 | .minimum = 0x00, |
122 | .maximum = 0x1ff, | 122 | .maximum = 0x1ff, |
123 | .step = 0x4, | 123 | .step = 0x4, |
124 | .default_value = EXPOSURE_DEFAULT, | 124 | .default_value = EXPOSURE_DEFAULT, |
125 | .flags = V4L2_CTRL_FLAG_SLIDER | 125 | .flags = V4L2_CTRL_FLAG_SLIDER |
126 | }, | 126 | }, |
127 | .set = ov9650_set_exposure, | 127 | .set = ov9650_set_exposure, |
128 | .get = ov9650_get_exposure | 128 | .get = ov9650_get_exposure |
@@ -146,13 +146,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
146 | { | 146 | { |
147 | { | 147 | { |
148 | .id = V4L2_CID_RED_BALANCE, | 148 | .id = V4L2_CID_RED_BALANCE, |
149 | .type = V4L2_CTRL_TYPE_INTEGER, | 149 | .type = V4L2_CTRL_TYPE_INTEGER, |
150 | .name = "red balance", | 150 | .name = "red balance", |
151 | .minimum = 0x00, | 151 | .minimum = 0x00, |
152 | .maximum = 0xff, | 152 | .maximum = 0xff, |
153 | .step = 0x1, | 153 | .step = 0x1, |
154 | .default_value = RED_GAIN_DEFAULT, | 154 | .default_value = RED_GAIN_DEFAULT, |
155 | .flags = V4L2_CTRL_FLAG_SLIDER | 155 | .flags = V4L2_CTRL_FLAG_SLIDER |
156 | }, | 156 | }, |
157 | .set = ov9650_set_red_balance, | 157 | .set = ov9650_set_red_balance, |
158 | .get = ov9650_get_red_balance | 158 | .get = ov9650_get_red_balance |
@@ -161,13 +161,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
161 | { | 161 | { |
162 | { | 162 | { |
163 | .id = V4L2_CID_BLUE_BALANCE, | 163 | .id = V4L2_CID_BLUE_BALANCE, |
164 | .type = V4L2_CTRL_TYPE_INTEGER, | 164 | .type = V4L2_CTRL_TYPE_INTEGER, |
165 | .name = "blue balance", | 165 | .name = "blue balance", |
166 | .minimum = 0x00, | 166 | .minimum = 0x00, |
167 | .maximum = 0xff, | 167 | .maximum = 0xff, |
168 | .step = 0x1, | 168 | .step = 0x1, |
169 | .default_value = BLUE_GAIN_DEFAULT, | 169 | .default_value = BLUE_GAIN_DEFAULT, |
170 | .flags = V4L2_CTRL_FLAG_SLIDER | 170 | .flags = V4L2_CTRL_FLAG_SLIDER |
171 | }, | 171 | }, |
172 | .set = ov9650_set_blue_balance, | 172 | .set = ov9650_set_blue_balance, |
173 | .get = ov9650_get_blue_balance | 173 | .get = ov9650_get_blue_balance |
@@ -175,13 +175,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
175 | #define HFLIP_IDX 4 | 175 | #define HFLIP_IDX 4 |
176 | { | 176 | { |
177 | { | 177 | { |
178 | .id = V4L2_CID_HFLIP, | 178 | .id = V4L2_CID_HFLIP, |
179 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 179 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
180 | .name = "horizontal flip", | 180 | .name = "horizontal flip", |
181 | .minimum = 0, | 181 | .minimum = 0, |
182 | .maximum = 1, | 182 | .maximum = 1, |
183 | .step = 1, | 183 | .step = 1, |
184 | .default_value = 0 | 184 | .default_value = 0 |
185 | }, | 185 | }, |
186 | .set = ov9650_set_hflip, | 186 | .set = ov9650_set_hflip, |
187 | .get = ov9650_get_hflip | 187 | .get = ov9650_get_hflip |
@@ -189,13 +189,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
189 | #define VFLIP_IDX 5 | 189 | #define VFLIP_IDX 5 |
190 | { | 190 | { |
191 | { | 191 | { |
192 | .id = V4L2_CID_VFLIP, | 192 | .id = V4L2_CID_VFLIP, |
193 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 193 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
194 | .name = "vertical flip", | 194 | .name = "vertical flip", |
195 | .minimum = 0, | 195 | .minimum = 0, |
196 | .maximum = 1, | 196 | .maximum = 1, |
197 | .step = 1, | 197 | .step = 1, |
198 | .default_value = 0 | 198 | .default_value = 0 |
199 | }, | 199 | }, |
200 | .set = ov9650_set_vflip, | 200 | .set = ov9650_set_vflip, |
201 | .get = ov9650_get_vflip | 201 | .get = ov9650_get_vflip |
@@ -203,13 +203,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
203 | #define AUTO_WHITE_BALANCE_IDX 6 | 203 | #define AUTO_WHITE_BALANCE_IDX 6 |
204 | { | 204 | { |
205 | { | 205 | { |
206 | .id = V4L2_CID_AUTO_WHITE_BALANCE, | 206 | .id = V4L2_CID_AUTO_WHITE_BALANCE, |
207 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 207 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
208 | .name = "auto white balance", | 208 | .name = "auto white balance", |
209 | .minimum = 0, | 209 | .minimum = 0, |
210 | .maximum = 1, | 210 | .maximum = 1, |
211 | .step = 1, | 211 | .step = 1, |
212 | .default_value = 1 | 212 | .default_value = 1 |
213 | }, | 213 | }, |
214 | .set = ov9650_set_auto_white_balance, | 214 | .set = ov9650_set_auto_white_balance, |
215 | .get = ov9650_get_auto_white_balance | 215 | .get = ov9650_get_auto_white_balance |
@@ -217,13 +217,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
217 | #define AUTO_GAIN_CTRL_IDX 7 | 217 | #define AUTO_GAIN_CTRL_IDX 7 |
218 | { | 218 | { |
219 | { | 219 | { |
220 | .id = V4L2_CID_AUTOGAIN, | 220 | .id = V4L2_CID_AUTOGAIN, |
221 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 221 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
222 | .name = "auto gain control", | 222 | .name = "auto gain control", |
223 | .minimum = 0, | 223 | .minimum = 0, |
224 | .maximum = 1, | 224 | .maximum = 1, |
225 | .step = 1, | 225 | .step = 1, |
226 | .default_value = 1 | 226 | .default_value = 1 |
227 | }, | 227 | }, |
228 | .set = ov9650_set_auto_gain, | 228 | .set = ov9650_set_auto_gain, |
229 | .get = ov9650_get_auto_gain | 229 | .get = ov9650_get_auto_gain |
@@ -231,13 +231,13 @@ static const struct ctrl ov9650_ctrls[] = { | |||
231 | #define AUTO_EXPOSURE_IDX 8 | 231 | #define AUTO_EXPOSURE_IDX 8 |
232 | { | 232 | { |
233 | { | 233 | { |
234 | .id = V4L2_CID_EXPOSURE_AUTO, | 234 | .id = V4L2_CID_EXPOSURE_AUTO, |
235 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 235 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
236 | .name = "auto exposure", | 236 | .name = "auto exposure", |
237 | .minimum = 0, | 237 | .minimum = 0, |
238 | .maximum = 1, | 238 | .maximum = 1, |
239 | .step = 1, | 239 | .step = 1, |
240 | .default_value = 1 | 240 | .default_value = 1 |
241 | }, | 241 | }, |
242 | .set = ov9650_set_auto_exposure, | 242 | .set = ov9650_set_auto_exposure, |
243 | .get = ov9650_get_auto_exposure | 243 | .get = ov9650_get_auto_exposure |
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h index c98c40d69e05..da9a129b739d 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.h +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h | |||
@@ -110,7 +110,7 @@ | |||
110 | 110 | ||
111 | #define OV9650_VARIOPIXEL (1 << 2) | 111 | #define OV9650_VARIOPIXEL (1 << 2) |
112 | #define OV9650_SYSTEM_CLK_SEL (1 << 7) | 112 | #define OV9650_SYSTEM_CLK_SEL (1 << 7) |
113 | #define OV9650_SLAM_MODE (1 << 4) | 113 | #define OV9650_SLAM_MODE (1 << 4) |
114 | 114 | ||
115 | #define OV9650_QVGA_VARIOPIXEL (1 << 7) | 115 | #define OV9650_QVGA_VARIOPIXEL (1 << 7) |
116 | 116 | ||
@@ -154,8 +154,7 @@ static const struct m5602_sensor ov9650 = { | |||
154 | .disconnect = ov9650_disconnect, | 154 | .disconnect = ov9650_disconnect, |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static const unsigned char preinit_ov9650[][3] = | 157 | static const unsigned char preinit_ov9650[][3] = { |
158 | { | ||
159 | /* [INITCAM] */ | 158 | /* [INITCAM] */ |
160 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | 159 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, |
161 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | 160 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, |
@@ -180,8 +179,7 @@ static const unsigned char preinit_ov9650[][3] = | |||
180 | {SENSOR, OV9650_OFON, 0x40} | 179 | {SENSOR, OV9650_OFON, 0x40} |
181 | }; | 180 | }; |
182 | 181 | ||
183 | static const unsigned char init_ov9650[][3] = | 182 | static const unsigned char init_ov9650[][3] = { |
184 | { | ||
185 | /* [INITCAM] */ | 183 | /* [INITCAM] */ |
186 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | 184 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, |
187 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | 185 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, |
@@ -297,8 +295,7 @@ static const unsigned char init_ov9650[][3] = | |||
297 | {SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X}, | 295 | {SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X}, |
298 | }; | 296 | }; |
299 | 297 | ||
300 | static const unsigned char res_init_ov9650[][3] = | 298 | static const unsigned char res_init_ov9650[][3] = { |
301 | { | ||
302 | {SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X}, | 299 | {SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X}, |
303 | 300 | ||
304 | {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82}, | 301 | {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82}, |
@@ -307,5 +304,4 @@ static const unsigned char res_init_ov9650[][3] = | |||
307 | {BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00}, | 304 | {BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00}, |
308 | {BRIDGE, M5602_XB_SIG_INI, 0x01} | 305 | {BRIDGE, M5602_XB_SIG_INI, 0x01} |
309 | }; | 306 | }; |
310 | |||
311 | #endif | 307 | #endif |
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c index 925b87d66f40..1febd34c2f05 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/drivers/media/video/gspca/m5602/m5602_po1030.c | |||
@@ -58,14 +58,14 @@ static const struct ctrl po1030_ctrls[] = { | |||
58 | #define GAIN_IDX 0 | 58 | #define GAIN_IDX 0 |
59 | { | 59 | { |
60 | { | 60 | { |
61 | .id = V4L2_CID_GAIN, | 61 | .id = V4L2_CID_GAIN, |
62 | .type = V4L2_CTRL_TYPE_INTEGER, | 62 | .type = V4L2_CTRL_TYPE_INTEGER, |
63 | .name = "gain", | 63 | .name = "gain", |
64 | .minimum = 0x00, | 64 | .minimum = 0x00, |
65 | .maximum = 0x4f, | 65 | .maximum = 0x4f, |
66 | .step = 0x1, | 66 | .step = 0x1, |
67 | .default_value = PO1030_GLOBAL_GAIN_DEFAULT, | 67 | .default_value = PO1030_GLOBAL_GAIN_DEFAULT, |
68 | .flags = V4L2_CTRL_FLAG_SLIDER | 68 | .flags = V4L2_CTRL_FLAG_SLIDER |
69 | }, | 69 | }, |
70 | .set = po1030_set_gain, | 70 | .set = po1030_set_gain, |
71 | .get = po1030_get_gain | 71 | .get = po1030_get_gain |
@@ -73,14 +73,14 @@ static const struct ctrl po1030_ctrls[] = { | |||
73 | #define EXPOSURE_IDX 1 | 73 | #define EXPOSURE_IDX 1 |
74 | { | 74 | { |
75 | { | 75 | { |
76 | .id = V4L2_CID_EXPOSURE, | 76 | .id = V4L2_CID_EXPOSURE, |
77 | .type = V4L2_CTRL_TYPE_INTEGER, | 77 | .type = V4L2_CTRL_TYPE_INTEGER, |
78 | .name = "exposure", | 78 | .name = "exposure", |
79 | .minimum = 0x00, | 79 | .minimum = 0x00, |
80 | .maximum = 0x02ff, | 80 | .maximum = 0x02ff, |
81 | .step = 0x1, | 81 | .step = 0x1, |
82 | .default_value = PO1030_EXPOSURE_DEFAULT, | 82 | .default_value = PO1030_EXPOSURE_DEFAULT, |
83 | .flags = V4L2_CTRL_FLAG_SLIDER | 83 | .flags = V4L2_CTRL_FLAG_SLIDER |
84 | }, | 84 | }, |
85 | .set = po1030_set_exposure, | 85 | .set = po1030_set_exposure, |
86 | .get = po1030_get_exposure | 86 | .get = po1030_get_exposure |
@@ -88,14 +88,14 @@ static const struct ctrl po1030_ctrls[] = { | |||
88 | #define RED_BALANCE_IDX 2 | 88 | #define RED_BALANCE_IDX 2 |
89 | { | 89 | { |
90 | { | 90 | { |
91 | .id = V4L2_CID_RED_BALANCE, | 91 | .id = V4L2_CID_RED_BALANCE, |
92 | .type = V4L2_CTRL_TYPE_INTEGER, | 92 | .type = V4L2_CTRL_TYPE_INTEGER, |
93 | .name = "red balance", | 93 | .name = "red balance", |
94 | .minimum = 0x00, | 94 | .minimum = 0x00, |
95 | .maximum = 0xff, | 95 | .maximum = 0xff, |
96 | .step = 0x1, | 96 | .step = 0x1, |
97 | .default_value = PO1030_RED_GAIN_DEFAULT, | 97 | .default_value = PO1030_RED_GAIN_DEFAULT, |
98 | .flags = V4L2_CTRL_FLAG_SLIDER | 98 | .flags = V4L2_CTRL_FLAG_SLIDER |
99 | }, | 99 | }, |
100 | .set = po1030_set_red_balance, | 100 | .set = po1030_set_red_balance, |
101 | .get = po1030_get_red_balance | 101 | .get = po1030_get_red_balance |
@@ -103,14 +103,14 @@ static const struct ctrl po1030_ctrls[] = { | |||
103 | #define BLUE_BALANCE_IDX 3 | 103 | #define BLUE_BALANCE_IDX 3 |
104 | { | 104 | { |
105 | { | 105 | { |
106 | .id = V4L2_CID_BLUE_BALANCE, | 106 | .id = V4L2_CID_BLUE_BALANCE, |
107 | .type = V4L2_CTRL_TYPE_INTEGER, | 107 | .type = V4L2_CTRL_TYPE_INTEGER, |
108 | .name = "blue balance", | 108 | .name = "blue balance", |
109 | .minimum = 0x00, | 109 | .minimum = 0x00, |
110 | .maximum = 0xff, | 110 | .maximum = 0xff, |
111 | .step = 0x1, | 111 | .step = 0x1, |
112 | .default_value = PO1030_BLUE_GAIN_DEFAULT, | 112 | .default_value = PO1030_BLUE_GAIN_DEFAULT, |
113 | .flags = V4L2_CTRL_FLAG_SLIDER | 113 | .flags = V4L2_CTRL_FLAG_SLIDER |
114 | }, | 114 | }, |
115 | .set = po1030_set_blue_balance, | 115 | .set = po1030_set_blue_balance, |
116 | .get = po1030_get_blue_balance | 116 | .get = po1030_get_blue_balance |
@@ -118,13 +118,13 @@ static const struct ctrl po1030_ctrls[] = { | |||
118 | #define HFLIP_IDX 4 | 118 | #define HFLIP_IDX 4 |
119 | { | 119 | { |
120 | { | 120 | { |
121 | .id = V4L2_CID_HFLIP, | 121 | .id = V4L2_CID_HFLIP, |
122 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 122 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
123 | .name = "horizontal flip", | 123 | .name = "horizontal flip", |
124 | .minimum = 0, | 124 | .minimum = 0, |
125 | .maximum = 1, | 125 | .maximum = 1, |
126 | .step = 1, | 126 | .step = 1, |
127 | .default_value = 0, | 127 | .default_value = 0, |
128 | }, | 128 | }, |
129 | .set = po1030_set_hflip, | 129 | .set = po1030_set_hflip, |
130 | .get = po1030_get_hflip | 130 | .get = po1030_get_hflip |
@@ -132,13 +132,13 @@ static const struct ctrl po1030_ctrls[] = { | |||
132 | #define VFLIP_IDX 5 | 132 | #define VFLIP_IDX 5 |
133 | { | 133 | { |
134 | { | 134 | { |
135 | .id = V4L2_CID_VFLIP, | 135 | .id = V4L2_CID_VFLIP, |
136 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 136 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
137 | .name = "vertical flip", | 137 | .name = "vertical flip", |
138 | .minimum = 0, | 138 | .minimum = 0, |
139 | .maximum = 1, | 139 | .maximum = 1, |
140 | .step = 1, | 140 | .step = 1, |
141 | .default_value = 0, | 141 | .default_value = 0, |
142 | }, | 142 | }, |
143 | .set = po1030_set_vflip, | 143 | .set = po1030_set_vflip, |
144 | .get = po1030_get_vflip | 144 | .get = po1030_get_vflip |
@@ -146,13 +146,13 @@ static const struct ctrl po1030_ctrls[] = { | |||
146 | #define AUTO_WHITE_BALANCE_IDX 6 | 146 | #define AUTO_WHITE_BALANCE_IDX 6 |
147 | { | 147 | { |
148 | { | 148 | { |
149 | .id = V4L2_CID_AUTO_WHITE_BALANCE, | 149 | .id = V4L2_CID_AUTO_WHITE_BALANCE, |
150 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 150 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
151 | .name = "auto white balance", | 151 | .name = "auto white balance", |
152 | .minimum = 0, | 152 | .minimum = 0, |
153 | .maximum = 1, | 153 | .maximum = 1, |
154 | .step = 1, | 154 | .step = 1, |
155 | .default_value = 0, | 155 | .default_value = 0, |
156 | }, | 156 | }, |
157 | .set = po1030_set_auto_white_balance, | 157 | .set = po1030_set_auto_white_balance, |
158 | .get = po1030_get_auto_white_balance | 158 | .get = po1030_get_auto_white_balance |
@@ -160,13 +160,13 @@ static const struct ctrl po1030_ctrls[] = { | |||
160 | #define AUTO_EXPOSURE_IDX 7 | 160 | #define AUTO_EXPOSURE_IDX 7 |
161 | { | 161 | { |
162 | { | 162 | { |
163 | .id = V4L2_CID_EXPOSURE_AUTO, | 163 | .id = V4L2_CID_EXPOSURE_AUTO, |
164 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 164 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
165 | .name = "auto exposure", | 165 | .name = "auto exposure", |
166 | .minimum = 0, | 166 | .minimum = 0, |
167 | .maximum = 1, | 167 | .maximum = 1, |
168 | .step = 1, | 168 | .step = 1, |
169 | .default_value = 0, | 169 | .default_value = 0, |
170 | }, | 170 | }, |
171 | .set = po1030_set_auto_exposure, | 171 | .set = po1030_set_auto_exposure, |
172 | .get = po1030_get_auto_exposure | 172 | .get = po1030_get_auto_exposure |
@@ -174,14 +174,14 @@ static const struct ctrl po1030_ctrls[] = { | |||
174 | #define GREEN_BALANCE_IDX 8 | 174 | #define GREEN_BALANCE_IDX 8 |
175 | { | 175 | { |
176 | { | 176 | { |
177 | .id = M5602_V4L2_CID_GREEN_BALANCE, | 177 | .id = M5602_V4L2_CID_GREEN_BALANCE, |
178 | .type = V4L2_CTRL_TYPE_INTEGER, | 178 | .type = V4L2_CTRL_TYPE_INTEGER, |
179 | .name = "green balance", | 179 | .name = "green balance", |
180 | .minimum = 0x00, | 180 | .minimum = 0x00, |
181 | .maximum = 0xff, | 181 | .maximum = 0xff, |
182 | .step = 0x1, | 182 | .step = 0x1, |
183 | .default_value = PO1030_GREEN_GAIN_DEFAULT, | 183 | .default_value = PO1030_GREEN_GAIN_DEFAULT, |
184 | .flags = V4L2_CTRL_FLAG_SLIDER | 184 | .flags = V4L2_CTRL_FLAG_SLIDER |
185 | }, | 185 | }, |
186 | .set = po1030_set_green_balance, | 186 | .set = po1030_set_green_balance, |
187 | .get = po1030_get_green_balance | 187 | .get = po1030_get_green_balance |
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.h b/drivers/media/video/gspca/m5602/m5602_po1030.h index 1ea380b2bbe7..338359596398 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.h +++ b/drivers/media/video/gspca/m5602/m5602_po1030.h | |||
@@ -139,9 +139,9 @@ | |||
139 | 139 | ||
140 | #define PO1030_GLOBAL_GAIN_DEFAULT 0x12 | 140 | #define PO1030_GLOBAL_GAIN_DEFAULT 0x12 |
141 | #define PO1030_EXPOSURE_DEFAULT 0x0085 | 141 | #define PO1030_EXPOSURE_DEFAULT 0x0085 |
142 | #define PO1030_BLUE_GAIN_DEFAULT 0x36 | 142 | #define PO1030_BLUE_GAIN_DEFAULT 0x36 |
143 | #define PO1030_RED_GAIN_DEFAULT 0x36 | 143 | #define PO1030_RED_GAIN_DEFAULT 0x36 |
144 | #define PO1030_GREEN_GAIN_DEFAULT 0x40 | 144 | #define PO1030_GREEN_GAIN_DEFAULT 0x40 |
145 | 145 | ||
146 | /*****************************************************************************/ | 146 | /*****************************************************************************/ |
147 | 147 | ||
@@ -166,8 +166,7 @@ static const struct m5602_sensor po1030 = { | |||
166 | .disconnect = po1030_disconnect, | 166 | .disconnect = po1030_disconnect, |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static const unsigned char preinit_po1030[][3] = | 169 | static const unsigned char preinit_po1030[][3] = { |
170 | { | ||
171 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | 170 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, |
172 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | 171 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, |
173 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | 172 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, |
@@ -193,8 +192,7 @@ static const unsigned char preinit_po1030[][3] = | |||
193 | {BRIDGE, M5602_XB_GPIO_DAT, 0x00} | 192 | {BRIDGE, M5602_XB_GPIO_DAT, 0x00} |
194 | }; | 193 | }; |
195 | 194 | ||
196 | static const unsigned char init_po1030[][3] = | 195 | static const unsigned char init_po1030[][3] = { |
197 | { | ||
198 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, | 196 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, |
199 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, | 197 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, |
200 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, | 198 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, |
@@ -271,5 +269,4 @@ static const unsigned char init_po1030[][3] = | |||
271 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, | 269 | {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, |
272 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00}, | 270 | {BRIDGE, M5602_XB_GPIO_EN_L, 0x00}, |
273 | }; | 271 | }; |
274 | |||
275 | #endif | 272 | #endif |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index da0a38c78708..d27280be9852 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -143,13 +143,13 @@ static const struct ctrl s5k4aa_ctrls[] = { | |||
143 | #define VFLIP_IDX 0 | 143 | #define VFLIP_IDX 0 |
144 | { | 144 | { |
145 | { | 145 | { |
146 | .id = V4L2_CID_VFLIP, | 146 | .id = V4L2_CID_VFLIP, |
147 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 147 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
148 | .name = "vertical flip", | 148 | .name = "vertical flip", |
149 | .minimum = 0, | 149 | .minimum = 0, |
150 | .maximum = 1, | 150 | .maximum = 1, |
151 | .step = 1, | 151 | .step = 1, |
152 | .default_value = 0 | 152 | .default_value = 0 |
153 | }, | 153 | }, |
154 | .set = s5k4aa_set_vflip, | 154 | .set = s5k4aa_set_vflip, |
155 | .get = s5k4aa_get_vflip | 155 | .get = s5k4aa_get_vflip |
@@ -157,13 +157,13 @@ static const struct ctrl s5k4aa_ctrls[] = { | |||
157 | #define HFLIP_IDX 1 | 157 | #define HFLIP_IDX 1 |
158 | { | 158 | { |
159 | { | 159 | { |
160 | .id = V4L2_CID_HFLIP, | 160 | .id = V4L2_CID_HFLIP, |
161 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 161 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
162 | .name = "horizontal flip", | 162 | .name = "horizontal flip", |
163 | .minimum = 0, | 163 | .minimum = 0, |
164 | .maximum = 1, | 164 | .maximum = 1, |
165 | .step = 1, | 165 | .step = 1, |
166 | .default_value = 0 | 166 | .default_value = 0 |
167 | }, | 167 | }, |
168 | .set = s5k4aa_set_hflip, | 168 | .set = s5k4aa_set_hflip, |
169 | .get = s5k4aa_get_hflip | 169 | .get = s5k4aa_get_hflip |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h index 4440da4e7f0f..8cc7a3f6da72 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h | |||
@@ -83,8 +83,7 @@ static const struct m5602_sensor s5k4aa = { | |||
83 | .disconnect = s5k4aa_disconnect, | 83 | .disconnect = s5k4aa_disconnect, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static const unsigned char preinit_s5k4aa[][4] = | 86 | static const unsigned char preinit_s5k4aa[][4] = { |
87 | { | ||
88 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | 87 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, |
89 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | 88 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, |
90 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | 89 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
@@ -127,8 +126,7 @@ static const unsigned char preinit_s5k4aa[][4] = | |||
127 | {SENSOR, S5K4AA_PAGE_MAP, 0x00, 0x00} | 126 | {SENSOR, S5K4AA_PAGE_MAP, 0x00, 0x00} |
128 | }; | 127 | }; |
129 | 128 | ||
130 | static const unsigned char init_s5k4aa[][4] = | 129 | static const unsigned char init_s5k4aa[][4] = { |
131 | { | ||
132 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | 130 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, |
133 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | 131 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, |
134 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | 132 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
@@ -179,8 +177,7 @@ static const unsigned char init_s5k4aa[][4] = | |||
179 | {SENSOR, 0x37, 0x00, 0x00}, | 177 | {SENSOR, 0x37, 0x00, 0x00}, |
180 | }; | 178 | }; |
181 | 179 | ||
182 | static const unsigned char VGA_s5k4aa[][4] = | 180 | static const unsigned char VGA_s5k4aa[][4] = { |
183 | { | ||
184 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, | 181 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, |
185 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | 182 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, |
186 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | 183 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, |
@@ -235,8 +232,7 @@ static const unsigned char VGA_s5k4aa[][4] = | |||
235 | {SENSOR, 0x02, 0x0e, 0x00}, | 232 | {SENSOR, 0x02, 0x0e, 0x00}, |
236 | }; | 233 | }; |
237 | 234 | ||
238 | static const unsigned char SXGA_s5k4aa[][4] = | 235 | static const unsigned char SXGA_s5k4aa[][4] = { |
239 | { | ||
240 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, | 236 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, |
241 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | 237 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, |
242 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | 238 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, |
@@ -284,6 +280,4 @@ static const unsigned char SXGA_s5k4aa[][4] = | |||
284 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, | 280 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, |
285 | {SENSOR, 0x02, 0x0e, 0x00}, | 281 | {SENSOR, 0x02, 0x0e, 0x00}, |
286 | }; | 282 | }; |
287 | |||
288 | |||
289 | #endif | 283 | #endif |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.h b/drivers/media/video/gspca/m5602/m5602_s5k83a.h index 7814b078acde..80a63a236e24 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define S5K83A_MAXIMUM_EXPOSURE 0x3c | 35 | #define S5K83A_MAXIMUM_EXPOSURE 0x3c |
36 | #define S5K83A_FLIP_MASK 0x10 | 36 | #define S5K83A_FLIP_MASK 0x10 |
37 | #define S5K83A_GPIO_LED_MASK 0x10 | 37 | #define S5K83A_GPIO_LED_MASK 0x10 |
38 | #define S5K83A_GPIO_ROTATION_MASK 0x40 | 38 | #define S5K83A_GPIO_ROTATION_MASK 0x40 |
39 | 39 | ||
40 | /*****************************************************************************/ | 40 | /*****************************************************************************/ |
41 | 41 | ||
@@ -67,8 +67,7 @@ struct s5k83a_priv { | |||
67 | s32 *settings; | 67 | s32 *settings; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | static const unsigned char preinit_s5k83a[][4] = | 70 | static const unsigned char preinit_s5k83a[][4] = { |
71 | { | ||
72 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, | 71 | {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, |
73 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, | 72 | {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, |
74 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | 73 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
@@ -108,8 +107,7 @@ static const unsigned char preinit_s5k83a[][4] = | |||
108 | /* This could probably be considerably shortened. | 107 | /* This could probably be considerably shortened. |
109 | I don't have the hardware to experiment with it, patches welcome | 108 | I don't have the hardware to experiment with it, patches welcome |
110 | */ | 109 | */ |
111 | static const unsigned char init_s5k83a[][4] = | 110 | static const unsigned char init_s5k83a[][4] = { |
112 | { | ||
113 | /* The following sequence is useless after a clean boot | 111 | /* The following sequence is useless after a clean boot |
114 | but is necessary after resume from suspend */ | 112 | but is necessary after resume from suspend */ |
115 | {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00}, | 113 | {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00}, |
@@ -166,8 +164,7 @@ static const unsigned char init_s5k83a[][4] = | |||
166 | {SENSOR, 0x00, 0x06, 0x00}, | 164 | {SENSOR, 0x00, 0x06, 0x00}, |
167 | }; | 165 | }; |
168 | 166 | ||
169 | static const unsigned char start_s5k83a[][4] = | 167 | static const unsigned char start_s5k83a[][4] = { |
170 | { | ||
171 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, | 168 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, |
172 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | 169 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, |
173 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, | 170 | {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, |
@@ -193,5 +190,4 @@ static const unsigned char start_s5k83a[][4] = | |||
193 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, | 190 | {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, |
194 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, | 191 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, |
195 | }; | 192 | }; |
196 | |||
197 | #endif | 193 | #endif |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 2417a7e70a42..6cf6855aa506 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -415,10 +415,10 @@ static const struct v4l2_pix_format ovfx2_ov3610_mode[] = { | |||
415 | 415 | ||
416 | /* Registers common to OV511 / OV518 */ | 416 | /* Registers common to OV511 / OV518 */ |
417 | #define R51x_FIFO_PSIZE 0x30 /* 2 bytes wide w/ OV518(+) */ | 417 | #define R51x_FIFO_PSIZE 0x30 /* 2 bytes wide w/ OV518(+) */ |
418 | #define R51x_SYS_RESET 0x50 | 418 | #define R51x_SYS_RESET 0x50 |
419 | /* Reset type flags */ | 419 | /* Reset type flags */ |
420 | #define OV511_RESET_OMNICE 0x08 | 420 | #define OV511_RESET_OMNICE 0x08 |
421 | #define R51x_SYS_INIT 0x53 | 421 | #define R51x_SYS_INIT 0x53 |
422 | #define R51x_SYS_SNAP 0x52 | 422 | #define R51x_SYS_SNAP 0x52 |
423 | #define R51x_SYS_CUST_ID 0x5F | 423 | #define R51x_SYS_CUST_ID 0x5F |
424 | #define R51x_COMP_LUT_BEGIN 0x80 | 424 | #define R51x_COMP_LUT_BEGIN 0x80 |
@@ -603,13 +603,11 @@ struct ov_i2c_regvals { | |||
603 | }; | 603 | }; |
604 | 604 | ||
605 | /* Settings for OV2610 camera chip */ | 605 | /* Settings for OV2610 camera chip */ |
606 | static const struct ov_i2c_regvals norm_2610[] = | 606 | static const struct ov_i2c_regvals norm_2610[] = { |
607 | { | ||
608 | { 0x12, 0x80 }, /* reset */ | 607 | { 0x12, 0x80 }, /* reset */ |
609 | }; | 608 | }; |
610 | 609 | ||
611 | static const struct ov_i2c_regvals norm_3620b[] = | 610 | static const struct ov_i2c_regvals norm_3620b[] = { |
612 | { | ||
613 | /* | 611 | /* |
614 | * From the datasheet: "Note that after writing to register COMH | 612 | * From the datasheet: "Note that after writing to register COMH |
615 | * (0x12) to change the sensor mode, registers related to the | 613 | * (0x12) to change the sensor mode, registers related to the |
@@ -2779,7 +2777,7 @@ static int ov511_configure(struct gspca_dev *gspca_dev) | |||
2779 | }; | 2777 | }; |
2780 | 2778 | ||
2781 | const struct ov_regvals norm_511[] = { | 2779 | const struct ov_regvals norm_511[] = { |
2782 | { R511_DRAM_FLOW_CTL, 0x01 }, | 2780 | { R511_DRAM_FLOW_CTL, 0x01 }, |
2783 | { R51x_SYS_SNAP, 0x00 }, | 2781 | { R51x_SYS_SNAP, 0x00 }, |
2784 | { R51x_SYS_SNAP, 0x02 }, | 2782 | { R51x_SYS_SNAP, 0x02 }, |
2785 | { R51x_SYS_SNAP, 0x00 }, | 2783 | { R51x_SYS_SNAP, 0x00 }, |
@@ -2863,7 +2861,7 @@ static int ov518_configure(struct gspca_dev *gspca_dev) | |||
2863 | const struct ov_regvals norm_518[] = { | 2861 | const struct ov_regvals norm_518[] = { |
2864 | { R51x_SYS_SNAP, 0x02 }, /* Reset */ | 2862 | { R51x_SYS_SNAP, 0x02 }, /* Reset */ |
2865 | { R51x_SYS_SNAP, 0x01 }, /* Enable */ | 2863 | { R51x_SYS_SNAP, 0x01 }, /* Enable */ |
2866 | { 0x31, 0x0f }, | 2864 | { 0x31, 0x0f }, |
2867 | { 0x5d, 0x03 }, | 2865 | { 0x5d, 0x03 }, |
2868 | { 0x24, 0x9f }, | 2866 | { 0x24, 0x9f }, |
2869 | { 0x25, 0x90 }, | 2867 | { 0x25, 0x90 }, |
@@ -2876,7 +2874,7 @@ static int ov518_configure(struct gspca_dev *gspca_dev) | |||
2876 | const struct ov_regvals norm_518_p[] = { | 2874 | const struct ov_regvals norm_518_p[] = { |
2877 | { R51x_SYS_SNAP, 0x02 }, /* Reset */ | 2875 | { R51x_SYS_SNAP, 0x02 }, /* Reset */ |
2878 | { R51x_SYS_SNAP, 0x01 }, /* Enable */ | 2876 | { R51x_SYS_SNAP, 0x01 }, /* Enable */ |
2879 | { 0x31, 0x0f }, | 2877 | { 0x31, 0x0f }, |
2880 | { 0x5d, 0x03 }, | 2878 | { 0x5d, 0x03 }, |
2881 | { 0x24, 0x9f }, | 2879 | { 0x24, 0x9f }, |
2882 | { 0x25, 0x90 }, | 2880 | { 0x25, 0x90 }, |
@@ -3653,7 +3651,7 @@ static int mode_init_ov_sensor_regs(struct sd *sd) | |||
3653 | break; | 3651 | break; |
3654 | case SEN_OV7610: | 3652 | case SEN_OV7610: |
3655 | i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20); | 3653 | i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20); |
3656 | i2c_w(sd, 0x35, qvga?0x1e:0x9e); | 3654 | i2c_w(sd, 0x35, qvga ? 0x1e : 0x9e); |
3657 | i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */ | 3655 | i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */ |
3658 | i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */ | 3656 | i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */ |
3659 | break; | 3657 | break; |
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 892b4549c6f8..15e97fa4c337 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c | |||
@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL"); | |||
45 | 45 | ||
46 | #define PAC207_GAIN_MIN 0 | 46 | #define PAC207_GAIN_MIN 0 |
47 | #define PAC207_GAIN_MAX 31 | 47 | #define PAC207_GAIN_MAX 31 |
48 | #define PAC207_GAIN_DEFAULT 9 /* power on default: 9 */ | 48 | #define PAC207_GAIN_DEFAULT 9 /* power on default: 9 */ |
49 | #define PAC207_GAIN_KNEE 31 | 49 | #define PAC207_GAIN_KNEE 31 |
50 | 50 | ||
51 | #define PAC207_AUTOGAIN_DEADZONE 30 | 51 | #define PAC207_AUTOGAIN_DEADZONE 30 |
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c index ac37737bf13b..55fbea7381b0 100644 --- a/drivers/media/video/gspca/pac7302.c +++ b/drivers/media/video/gspca/pac7302.c | |||
@@ -897,9 +897,8 @@ static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val) | |||
897 | struct sd *sd = (struct sd *) gspca_dev; | 897 | struct sd *sd = (struct sd *) gspca_dev; |
898 | 898 | ||
899 | sd->contrast = val; | 899 | sd->contrast = val; |
900 | if (gspca_dev->streaming) { | 900 | if (gspca_dev->streaming) |
901 | setbrightcont(gspca_dev); | 901 | setbrightcont(gspca_dev); |
902 | } | ||
903 | return gspca_dev->usb_err; | 902 | return gspca_dev->usb_err; |
904 | } | 903 | } |
905 | 904 | ||
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index 7cb5b40c29a6..7657b43b3203 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -672,9 +672,8 @@ static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val) | |||
672 | struct sd *sd = (struct sd *) gspca_dev; | 672 | struct sd *sd = (struct sd *) gspca_dev; |
673 | 673 | ||
674 | sd->contrast = val; | 674 | sd->contrast = val; |
675 | if (gspca_dev->streaming) { | 675 | if (gspca_dev->streaming) |
676 | setcontrast(gspca_dev); | 676 | setcontrast(gspca_dev); |
677 | } | ||
678 | return gspca_dev->usb_err; | 677 | return gspca_dev->usb_err; |
679 | } | 678 | } |
680 | 679 | ||
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 57673891c2c2..6b155ae3a746 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
@@ -1270,7 +1270,8 @@ static int soi968_init_sensor(struct gspca_dev *gspca_dev) | |||
1270 | } | 1270 | } |
1271 | } | 1271 | } |
1272 | /* disable hflip and vflip */ | 1272 | /* disable hflip and vflip */ |
1273 | gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX) | (1 << EXPOSURE_IDX); | 1273 | gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX) |
1274 | | (1 << EXPOSURE_IDX); | ||
1274 | sd->hstart = 60; | 1275 | sd->hstart = 60; |
1275 | sd->vstart = 11; | 1276 | sd->vstart = 11; |
1276 | return 0; | 1277 | return 0; |
@@ -1349,7 +1350,9 @@ static int mt9v_init_sensor(struct gspca_dev *gspca_dev) | |||
1349 | return -ENODEV; | 1350 | return -ENODEV; |
1350 | } | 1351 | } |
1351 | } | 1352 | } |
1352 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) | (1 << GAIN_IDX); | 1353 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) |
1354 | | (1 << AUTOGAIN_IDX) | ||
1355 | | (1 << GAIN_IDX); | ||
1353 | sd->hstart = 2; | 1356 | sd->hstart = 2; |
1354 | sd->vstart = 2; | 1357 | sd->vstart = 2; |
1355 | sd->sensor = SENSOR_MT9V111; | 1358 | sd->sensor = SENSOR_MT9V111; |
@@ -1393,7 +1396,8 @@ static int mt9m112_init_sensor(struct gspca_dev *gspca_dev) | |||
1393 | return -ENODEV; | 1396 | return -ENODEV; |
1394 | } | 1397 | } |
1395 | } | 1398 | } |
1396 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) | (1 << GAIN_IDX); | 1399 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) |
1400 | | (1 << GAIN_IDX); | ||
1397 | sd->hstart = 0; | 1401 | sd->hstart = 0; |
1398 | sd->vstart = 2; | 1402 | sd->vstart = 2; |
1399 | return 0; | 1403 | return 0; |
@@ -1410,7 +1414,8 @@ static int mt9m111_init_sensor(struct gspca_dev *gspca_dev) | |||
1410 | return -ENODEV; | 1414 | return -ENODEV; |
1411 | } | 1415 | } |
1412 | } | 1416 | } |
1413 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) | (1 << GAIN_IDX); | 1417 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) |
1418 | | (1 << GAIN_IDX); | ||
1414 | sd->hstart = 0; | 1419 | sd->hstart = 0; |
1415 | sd->vstart = 2; | 1420 | sd->vstart = 2; |
1416 | return 0; | 1421 | return 0; |
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index 814ea1e8a28e..706f96f92654 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c | |||
@@ -323,10 +323,9 @@ static const __u8 initOv6650[] = { | |||
323 | 0x00, 0x01, 0x01, 0x0a, 0x16, 0x12, 0x68, 0x8b, | 323 | 0x00, 0x01, 0x01, 0x0a, 0x16, 0x12, 0x68, 0x8b, |
324 | 0x10, 0x1d, 0x10, 0x02, 0x02, 0x09, 0x07 | 324 | 0x10, 0x1d, 0x10, 0x02, 0x02, 0x09, 0x07 |
325 | }; | 325 | }; |
326 | static const __u8 ov6650_sensor_init[][8] = | 326 | static const __u8 ov6650_sensor_init[][8] = { |
327 | { | ||
328 | /* Bright, contrast, etc are set through SCBB interface. | 327 | /* Bright, contrast, etc are set through SCBB interface. |
329 | * AVCAP on win2 do not send any data on this controls. */ | 328 | * AVCAP on win2 do not send any data on this controls. */ |
330 | /* Anyway, some registers appears to alter bright and constrat */ | 329 | /* Anyway, some registers appears to alter bright and constrat */ |
331 | 330 | ||
332 | /* Reset sensor */ | 331 | /* Reset sensor */ |
@@ -544,7 +543,7 @@ static const __u8 initTas5130[] = { | |||
544 | 0x18, 0x10, 0x04, 0x03, 0x11, 0x0c | 543 | 0x18, 0x10, 0x04, 0x03, 0x11, 0x0c |
545 | }; | 544 | }; |
546 | static const __u8 tas5130_sensor_init[][8] = { | 545 | static const __u8 tas5130_sensor_init[][8] = { |
547 | /* {0x30, 0x11, 0x00, 0x40, 0x47, 0x00, 0x00, 0x10}, | 546 | /* {0x30, 0x11, 0x00, 0x40, 0x47, 0x00, 0x00, 0x10}, |
548 | * shutter 0x47 short exposure? */ | 547 | * shutter 0x47 short exposure? */ |
549 | {0x30, 0x11, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10}, | 548 | {0x30, 0x11, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10}, |
550 | /* shutter 0x01 long exposure */ | 549 | /* shutter 0x01 long exposure */ |
@@ -861,7 +860,7 @@ static void setexposure(struct gspca_dev *gspca_dev) | |||
861 | i2c[4] |= reg11 - 1; | 860 | i2c[4] |= reg11 - 1; |
862 | 861 | ||
863 | /* If register 11 didn't change, don't change it */ | 862 | /* If register 11 didn't change, don't change it */ |
864 | if (sd->reg11 == reg11 ) | 863 | if (sd->reg11 == reg11) |
865 | i2c[0] = 0xa0; | 864 | i2c[0] = 0xa0; |
866 | 865 | ||
867 | if (i2c_w(gspca_dev, i2c) == 0) | 866 | if (i2c_w(gspca_dev, i2c) == 0) |
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index f5dab675c96c..330dadc00106 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -321,6 +321,7 @@ static const __u32 ctrl_dis[] = { | |||
321 | [SENSOR_PO2030N] = (1 << AUTOGAIN) | | 321 | [SENSOR_PO2030N] = (1 << AUTOGAIN) | |
322 | (1 << INFRARED) | | 322 | (1 << INFRARED) | |
323 | (1 << FREQ), | 323 | (1 << FREQ), |
324 | |||
324 | [SENSOR_SOI768] = (1 << AUTOGAIN) | | 325 | [SENSOR_SOI768] = (1 << AUTOGAIN) | |
325 | (1 << INFRARED) | | 326 | (1 << INFRARED) | |
326 | (1 << HFLIP) | | 327 | (1 << HFLIP) | |
@@ -1712,7 +1713,6 @@ static void ov7648_probe(struct gspca_dev *gspca_dev) | |||
1712 | sd->sensor = SENSOR_PO1030; | 1713 | sd->sensor = SENSOR_PO1030; |
1713 | return; | 1714 | return; |
1714 | } | 1715 | } |
1715 | |||
1716 | err("Unknown sensor %04x", val); | 1716 | err("Unknown sensor %04x", val); |
1717 | } | 1717 | } |
1718 | 1718 | ||
@@ -2678,7 +2678,6 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
2678 | break; | 2678 | break; |
2679 | } | 2679 | } |
2680 | 2680 | ||
2681 | |||
2682 | /* here change size mode 0 -> VGA; 1 -> CIF */ | 2681 | /* here change size mode 0 -> VGA; 1 -> CIF */ |
2683 | sd->reg18 = sn9c1xx[0x18] | (mode << 4) | 0x40; | 2682 | sd->reg18 = sn9c1xx[0x18] | (mode << 4) | 0x40; |
2684 | reg_w1(gspca_dev, 0x18, sd->reg18); | 2683 | reg_w1(gspca_dev, 0x18, sd->reg18); |
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index c4bc520735f3..642839a11e8d 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -1724,7 +1724,7 @@ static const __u16 spca501c_mysterious_init_data[][3] = { | |||
1724 | {0x00, 0x0000, 0x0048}, | 1724 | {0x00, 0x0000, 0x0048}, |
1725 | {0x00, 0x0000, 0x0049}, | 1725 | {0x00, 0x0000, 0x0049}, |
1726 | {0x00, 0x0008, 0x004a}, | 1726 | {0x00, 0x0008, 0x004a}, |
1727 | /* DSP Registers */ | 1727 | /* DSP Registers */ |
1728 | {0x01, 0x00a6, 0x0000}, | 1728 | {0x01, 0x00a6, 0x0000}, |
1729 | {0x01, 0x0028, 0x0001}, | 1729 | {0x01, 0x0028, 0x0001}, |
1730 | {0x01, 0x0000, 0x0002}, | 1730 | {0x01, 0x0000, 0x0002}, |
@@ -1788,7 +1788,7 @@ static const __u16 spca501c_mysterious_init_data[][3] = { | |||
1788 | {0x05, 0x0022, 0x0004}, | 1788 | {0x05, 0x0022, 0x0004}, |
1789 | {0x05, 0x0025, 0x0001}, | 1789 | {0x05, 0x0025, 0x0001}, |
1790 | {0x05, 0x0000, 0x0000}, | 1790 | {0x05, 0x0000, 0x0000}, |
1791 | /* Part 4 */ | 1791 | /* Part 4 */ |
1792 | {0x05, 0x0026, 0x0001}, | 1792 | {0x05, 0x0026, 0x0001}, |
1793 | {0x05, 0x0001, 0x0000}, | 1793 | {0x05, 0x0001, 0x0000}, |
1794 | {0x05, 0x0027, 0x0001}, | 1794 | {0x05, 0x0027, 0x0001}, |
@@ -1806,7 +1806,7 @@ static const __u16 spca501c_mysterious_init_data[][3] = { | |||
1806 | {0x05, 0x0001, 0x0000}, | 1806 | {0x05, 0x0001, 0x0000}, |
1807 | {0x05, 0x0027, 0x0001}, | 1807 | {0x05, 0x0027, 0x0001}, |
1808 | {0x05, 0x004e, 0x0000}, | 1808 | {0x05, 0x004e, 0x0000}, |
1809 | /* Part 5 */ | 1809 | /* Part 5 */ |
1810 | {0x01, 0x0003, 0x003f}, | 1810 | {0x01, 0x0003, 0x003f}, |
1811 | {0x01, 0x0001, 0x0056}, | 1811 | {0x01, 0x0001, 0x0056}, |
1812 | {0x01, 0x000f, 0x0008}, | 1812 | {0x01, 0x000f, 0x0008}, |
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 9d5b6666a9ae..7307638ac91d 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
@@ -92,8 +92,7 @@ static const struct v4l2_pix_format sif_mode[] = { | |||
92 | * Initialization data: this is the first set-up data written to the | 92 | * Initialization data: this is the first set-up data written to the |
93 | * device (before the open data). | 93 | * device (before the open data). |
94 | */ | 94 | */ |
95 | static const u16 spca508_init_data[][2] = | 95 | static const u16 spca508_init_data[][2] = { |
96 | { | ||
97 | {0x0000, 0x870b}, | 96 | {0x0000, 0x870b}, |
98 | 97 | ||
99 | {0x0020, 0x8112}, /* Video drop enable, ISO streaming disable */ | 98 | {0x0020, 0x8112}, /* Video drop enable, ISO streaming disable */ |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.h b/drivers/media/video/gspca/stv06xx/stv06xx.h index 053a27e3a400..e0f63c51f40d 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.h +++ b/drivers/media/video/gspca/stv06xx/stv06xx.h | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #define STV_ISOC_ENDPOINT_ADDR 0x81 | 38 | #define STV_ISOC_ENDPOINT_ADDR 0x81 |
39 | 39 | ||
40 | #define STV_REG23 0x0423 | 40 | #define STV_REG23 0x0423 |
41 | 41 | ||
42 | /* Control registers of the STV0600 ASIC */ | 42 | /* Control registers of the STV0600 ASIC */ |
43 | #define STV_I2C_PARTNER 0x1420 | 43 | #define STV_I2C_PARTNER 0x1420 |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index 706e08dc5254..17531b41a073 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | |||
@@ -39,8 +39,8 @@ static const struct ctrl hdcs1x00_ctrl[] = { | |||
39 | .minimum = 0x00, | 39 | .minimum = 0x00, |
40 | .maximum = 0xff, | 40 | .maximum = 0xff, |
41 | .step = 0x1, | 41 | .step = 0x1, |
42 | .default_value = HDCS_DEFAULT_EXPOSURE, | 42 | .default_value = HDCS_DEFAULT_EXPOSURE, |
43 | .flags = V4L2_CTRL_FLAG_SLIDER | 43 | .flags = V4L2_CTRL_FLAG_SLIDER |
44 | }, | 44 | }, |
45 | .set = hdcs_set_exposure, | 45 | .set = hdcs_set_exposure, |
46 | .get = hdcs_get_exposure | 46 | .get = hdcs_get_exposure |
@@ -52,8 +52,8 @@ static const struct ctrl hdcs1x00_ctrl[] = { | |||
52 | .minimum = 0x00, | 52 | .minimum = 0x00, |
53 | .maximum = 0xff, | 53 | .maximum = 0xff, |
54 | .step = 0x1, | 54 | .step = 0x1, |
55 | .default_value = HDCS_DEFAULT_GAIN, | 55 | .default_value = HDCS_DEFAULT_GAIN, |
56 | .flags = V4L2_CTRL_FLAG_SLIDER | 56 | .flags = V4L2_CTRL_FLAG_SLIDER |
57 | }, | 57 | }, |
58 | .set = hdcs_set_gain, | 58 | .set = hdcs_set_gain, |
59 | .get = hdcs_get_gain | 59 | .get = hdcs_get_gain |
@@ -83,8 +83,8 @@ static const struct ctrl hdcs1020_ctrl[] = { | |||
83 | .minimum = 0x00, | 83 | .minimum = 0x00, |
84 | .maximum = 0xffff, | 84 | .maximum = 0xffff, |
85 | .step = 0x1, | 85 | .step = 0x1, |
86 | .default_value = HDCS_DEFAULT_EXPOSURE, | 86 | .default_value = HDCS_DEFAULT_EXPOSURE, |
87 | .flags = V4L2_CTRL_FLAG_SLIDER | 87 | .flags = V4L2_CTRL_FLAG_SLIDER |
88 | }, | 88 | }, |
89 | .set = hdcs_set_exposure, | 89 | .set = hdcs_set_exposure, |
90 | .get = hdcs_get_exposure | 90 | .get = hdcs_get_exposure |
@@ -96,8 +96,8 @@ static const struct ctrl hdcs1020_ctrl[] = { | |||
96 | .minimum = 0x00, | 96 | .minimum = 0x00, |
97 | .maximum = 0xff, | 97 | .maximum = 0xff, |
98 | .step = 0x1, | 98 | .step = 0x1, |
99 | .default_value = HDCS_DEFAULT_GAIN, | 99 | .default_value = HDCS_DEFAULT_GAIN, |
100 | .flags = V4L2_CTRL_FLAG_SLIDER | 100 | .flags = V4L2_CTRL_FLAG_SLIDER |
101 | }, | 101 | }, |
102 | .set = hdcs_set_gain, | 102 | .set = hdcs_set_gain, |
103 | .get = hdcs_get_gain | 103 | .get = hdcs_get_gain |
@@ -163,7 +163,8 @@ static int hdcs_reg_write_seq(struct sd *sd, u8 reg, u8 *vals, u8 len) | |||
163 | for (i = 0; i < len; i++) { | 163 | for (i = 0; i < len; i++) { |
164 | regs[2 * i] = reg; | 164 | regs[2 * i] = reg; |
165 | regs[2 * i + 1] = vals[i]; | 165 | regs[2 * i + 1] = vals[i]; |
166 | /* All addresses are shifted left one bit as bit 0 toggles r/w */ | 166 | /* All addresses are shifted left one bit |
167 | * as bit 0 toggles r/w */ | ||
167 | reg += 2; | 168 | reg += 2; |
168 | } | 169 | } |
169 | 170 | ||
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h index 37b31c99d956..cf3d0ccc1121 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h +++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define HDCS_REG_CONTROL(sd) (IS_1020(sd) ? HDCS20_CONTROL : HDCS00_CONTROL) | 37 | #define HDCS_REG_CONTROL(sd) (IS_1020(sd) ? HDCS20_CONTROL : HDCS00_CONTROL) |
38 | 38 | ||
39 | #define HDCS_1X00_DEF_WIDTH 360 | 39 | #define HDCS_1X00_DEF_WIDTH 360 |
40 | #define HDCS_1X00_DEF_HEIGHT 296 | 40 | #define HDCS_1X00_DEF_HEIGHT 296 |
41 | 41 | ||
42 | #define HDCS_1020_DEF_WIDTH 352 | 42 | #define HDCS_1020_DEF_WIDTH 352 |
43 | #define HDCS_1020_DEF_HEIGHT 292 | 43 | #define HDCS_1020_DEF_HEIGHT 292 |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c index 11a0c002f5dc..f8398434c328 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c | |||
@@ -66,7 +66,7 @@ static const struct ctrl vv6410_ctrl[] = { | |||
66 | .minimum = 0, | 66 | .minimum = 0, |
67 | .maximum = 1, | 67 | .maximum = 1, |
68 | .step = 1, | 68 | .step = 1, |
69 | .default_value = 0 | 69 | .default_value = 0 |
70 | }, | 70 | }, |
71 | .set = vv6410_set_vflip, | 71 | .set = vv6410_set_vflip, |
72 | .get = vv6410_get_vflip | 72 | .get = vv6410_get_vflip |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h index 96c61926d372..b3b5508473bc 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h +++ b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h | |||
@@ -157,8 +157,8 @@ | |||
157 | /* Audio Amplifier Setup Register */ | 157 | /* Audio Amplifier Setup Register */ |
158 | #define VV6410_AT1 0x79 | 158 | #define VV6410_AT1 0x79 |
159 | 159 | ||
160 | #define VV6410_HFLIP (1 << 3) | 160 | #define VV6410_HFLIP (1 << 3) |
161 | #define VV6410_VFLIP (1 << 4) | 161 | #define VV6410_VFLIP (1 << 4) |
162 | 162 | ||
163 | #define VV6410_LOW_POWER_MODE (1 << 0) | 163 | #define VV6410_LOW_POWER_MODE (1 << 0) |
164 | #define VV6410_SOFT_RESET (1 << 2) | 164 | #define VV6410_SOFT_RESET (1 << 2) |
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index d46a39f02afb..a9cbcd6011d9 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c | |||
@@ -463,7 +463,7 @@ static void setup_qtable(struct gspca_dev *gspca_dev, | |||
463 | 463 | ||
464 | /* loop over y components */ | 464 | /* loop over y components */ |
465 | for (i = 0; i < 64; i++) | 465 | for (i = 0; i < 64; i++) |
466 | reg_w_riv(gspca_dev, 0x00, 0x2800 + i, qtable[0][i]); | 466 | reg_w_riv(gspca_dev, 0x00, 0x2800 + i, qtable[0][i]); |
467 | 467 | ||
468 | /* loop over c components */ | 468 | /* loop over c components */ |
469 | for (i = 0; i < 64; i++) | 469 | for (i = 0; i < 64; i++) |
@@ -712,8 +712,9 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
712 | sd->subtype = id->driver_info; | 712 | sd->subtype = id->driver_info; |
713 | 713 | ||
714 | if (sd->subtype == AiptekMiniPenCam13) { | 714 | if (sd->subtype == AiptekMiniPenCam13) { |
715 | /* try to get the firmware as some cam answer 2.0.1.2.2 | 715 | |
716 | * and should be a spca504b then overwrite that setting */ | 716 | /* try to get the firmware as some cam answer 2.0.1.2.2 |
717 | * and should be a spca504b then overwrite that setting */ | ||
717 | reg_r(gspca_dev, 0x20, 0, 1); | 718 | reg_r(gspca_dev, 0x20, 0, 1); |
718 | switch (gspca_dev->usb_buf[0]) { | 719 | switch (gspca_dev->usb_buf[0]) { |
719 | case 1: | 720 | case 1: |
@@ -733,7 +734,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
733 | /* case BRIDGE_SPCA504: */ | 734 | /* case BRIDGE_SPCA504: */ |
734 | /* case BRIDGE_SPCA536: */ | 735 | /* case BRIDGE_SPCA536: */ |
735 | cam->cam_mode = vga_mode; | 736 | cam->cam_mode = vga_mode; |
736 | cam->nmodes =ARRAY_SIZE(vga_mode); | 737 | cam->nmodes = ARRAY_SIZE(vga_mode); |
737 | break; | 738 | break; |
738 | case BRIDGE_SPCA533: | 739 | case BRIDGE_SPCA533: |
739 | cam->cam_mode = custom_mode; | 740 | cam->cam_mode = custom_mode; |
diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index d070c7ffbfa9..4066ac8c45a0 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c | |||
@@ -67,7 +67,7 @@ static int reg_w(struct sd *sd, __u16 index, __u16 value); | |||
67 | --------------------------------------------------------------------------*/ | 67 | --------------------------------------------------------------------------*/ |
68 | static int w9968cf_write_fsb(struct sd *sd, u16* data) | 68 | static int w9968cf_write_fsb(struct sd *sd, u16* data) |
69 | { | 69 | { |
70 | struct usb_device* udev = sd->gspca_dev.dev; | 70 | struct usb_device *udev = sd->gspca_dev.dev; |
71 | u16 value; | 71 | u16 value; |
72 | int ret; | 72 | int ret; |
73 | 73 | ||
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index c9c2b89c5bf9..c7e1970ca284 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -2951,7 +2951,7 @@ static const struct usb_action mc501cb_Initial[] = { | |||
2951 | {} | 2951 | {} |
2952 | }; | 2952 | }; |
2953 | 2953 | ||
2954 | static const struct usb_action mc501cb_InitialScale[] = { /* 320x240 */ | 2954 | static const struct usb_action mc501cb_InitialScale[] = { /* 320x240 */ |
2955 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ | 2955 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
2956 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ | 2956 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
2957 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ | 2957 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
@@ -3729,7 +3729,6 @@ static const struct usb_action pas106b_InitialScale[] = { /* 176x144 */ | |||
3729 | {0xaa, 0x0d, 0x0000}, | 3729 | {0xaa, 0x0d, 0x0000}, |
3730 | {0xaa, 0x0e, 0x0002}, | 3730 | {0xaa, 0x0e, 0x0002}, |
3731 | {0xaa, 0x14, 0x0081}, | 3731 | {0xaa, 0x14, 0x0081}, |
3732 | |||
3733 | /* Other registers */ | 3732 | /* Other registers */ |
3734 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, | 3733 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
3735 | /* Frame retreiving */ | 3734 | /* Frame retreiving */ |
@@ -3783,7 +3782,6 @@ static const struct usb_action pas106b_InitialScale[] = { /* 176x144 */ | |||
3783 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, | 3782 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
3784 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, | 3783 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
3785 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, | 3784 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
3786 | |||
3787 | /* Auto exposure and white balance */ | 3785 | /* Auto exposure and white balance */ |
3788 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, | 3786 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
3789 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, | 3787 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
@@ -3847,7 +3845,6 @@ static const struct usb_action pas106b_Initial[] = { /* 352x288 */ | |||
3847 | {0xaa, 0x0d, 0x0000}, | 3845 | {0xaa, 0x0d, 0x0000}, |
3848 | {0xaa, 0x0e, 0x0002}, | 3846 | {0xaa, 0x0e, 0x0002}, |
3849 | {0xaa, 0x14, 0x0081}, | 3847 | {0xaa, 0x14, 0x0081}, |
3850 | |||
3851 | /* Other registers */ | 3848 | /* Other registers */ |
3852 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, | 3849 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
3853 | /* Frame retreiving */ | 3850 | /* Frame retreiving */ |
@@ -6307,8 +6304,7 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev) | |||
6307 | if (chipset_revision_sensor[i].revision == retword) { | 6304 | if (chipset_revision_sensor[i].revision == retword) { |
6308 | sd->chip_revision = retword; | 6305 | sd->chip_revision = retword; |
6309 | send_unknown(gspca_dev, SENSOR_PB0330); | 6306 | send_unknown(gspca_dev, SENSOR_PB0330); |
6310 | return chipset_revision_sensor[i] | 6307 | return chipset_revision_sensor[i].internal_sensor_id; |
6311 | .internal_sensor_id; | ||
6312 | } | 6308 | } |
6313 | } | 6309 | } |
6314 | 6310 | ||
@@ -6787,7 +6783,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6787 | /* fall thru */ | 6783 | /* fall thru */ |
6788 | case SENSOR_PAS202B: | 6784 | case SENSOR_PAS202B: |
6789 | case SENSOR_PO2030: | 6785 | case SENSOR_PO2030: |
6790 | /* reg_w(gspca_dev, 0x40, ZC3XX_R117_GGAIN); * (from win traces) */ | 6786 | /* reg_w(gspca_dev, 0x40, ZC3XX_R117_GGAIN); in win traces */ |
6791 | reg_r(gspca_dev, 0x0180); | 6787 | reg_r(gspca_dev, 0x0180); |
6792 | break; | 6788 | break; |
6793 | case SENSOR_OV7620: | 6789 | case SENSOR_OV7620: |
@@ -6795,7 +6791,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6795 | reg_w(gspca_dev, 0x15, 0x01ae); | 6791 | reg_w(gspca_dev, 0x15, 0x01ae); |
6796 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ | 6792 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ |
6797 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); | 6793 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); |
6798 | /*fixme: returned value to send? */ | 6794 | /*fixme: returned value to send? */ |
6799 | reg_w(gspca_dev, 0x40, 0x0117); | 6795 | reg_w(gspca_dev, 0x40, 0x0117); |
6800 | reg_r(gspca_dev, 0x0180); | 6796 | reg_r(gspca_dev, 0x0180); |
6801 | break; | 6797 | break; |
@@ -6838,7 +6834,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
6838 | /* remove the webcam's header: | 6834 | /* remove the webcam's header: |
6839 | * ff d8 ff fe 00 0e 00 00 ss ss 00 01 ww ww hh hh pp pp | 6835 | * ff d8 ff fe 00 0e 00 00 ss ss 00 01 ww ww hh hh pp pp |
6840 | * - 'ss ss' is the frame sequence number (BE) | 6836 | * - 'ss ss' is the frame sequence number (BE) |
6841 | * - 'ww ww' and 'hh hh' are the window dimensions (BE) | 6837 | * - 'ww ww' and 'hh hh' are the window dimensions (BE) |
6842 | * - 'pp pp' is the packet sequence number (BE) | 6838 | * - 'pp pp' is the packet sequence number (BE) |
6843 | */ | 6839 | */ |
6844 | data += 18; | 6840 | data += 18; |