aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2009-06-26 08:20:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:17:46 -0400
commiteb3678fbe5d5be8315628885b7c93228c97a433d (patch)
treeaa4aedc38615358ddabfaeea77d7fad61fa1505f /drivers/media
parent2ec92c28d73a0d2206c961180b955876d4f62a94 (diff)
V4L/DVB (12988): gspca - m5602-ov7660: Remove old init
Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov7660.c12
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov7660.h129
2 files changed, 6 insertions, 135 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c
index 9b5e10532796..9648b90eec73 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov7660.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c
@@ -244,17 +244,17 @@ int ov7660_init(struct sd *sd)
244 s32 *sensor_settings = sd->sensor_priv; 244 s32 *sensor_settings = sd->sensor_priv;
245 245
246 /* Init the sensor */ 246 /* Init the sensor */
247 for (i = 0; i < ARRAY_SIZE(init2_ov7660); i++) { 247 for (i = 0; i < ARRAY_SIZE(init_ov7660); i++) {
248 u8 data[2]; 248 u8 data[2];
249 249
250 if (init2_ov7660[i][0] == BRIDGE) { 250 if (init_ov7660[i][0] == BRIDGE) {
251 err = m5602_write_bridge(sd, 251 err = m5602_write_bridge(sd,
252 init2_ov7660[i][1], 252 init_ov7660[i][1],
253 init2_ov7660[i][2]); 253 init_ov7660[i][2]);
254 } else { 254 } else {
255 data[0] = init2_ov7660[i][2]; 255 data[0] = init_ov7660[i][2];
256 err = m5602_write_sensor(sd, 256 err = m5602_write_sensor(sd,
257 init2_ov7660[i][1], data, 1); 257 init_ov7660[i][1], data, 1);
258 } 258 }
259 } 259 }
260 260
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.h b/drivers/media/video/gspca/m5602/m5602_ov7660.h
index 2ce05039b037..3360aaec2578 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov7660.h
+++ b/drivers/media/video/gspca/m5602/m5602_ov7660.h
@@ -149,135 +149,6 @@ static const unsigned char init_ov7660[][4] =
149 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0}, 149 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
150 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d}, 150 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d},
151 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00}, 151 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
152 {BRIDGE, M5602_XB_GPIO_DIR, 0x03},
153 {BRIDGE, M5602_XB_GPIO_DIR, 0x03},
154 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
155 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
156
157 {SENSOR, OV7660_OFON, 0x0c},
158 {SENSOR, OV7660_COM2, 0x11},
159 {SENSOR, OV7660_COM7, 0x05},
160
161 {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
162 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
163 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
164 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
165 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
166 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08},
167 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
168 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
169 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
170 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
171 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
172 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
173 {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
174 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
175 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
176
177 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x02},
178 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
179
180 {SENSOR, OV7660_AECH, OV7660_DEFAULT_EXPOSURE},
181 {SENSOR, OV7660_COM1, 0x00},
182
183 {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
184 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
185 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
186 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
187 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
188 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08},
189 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
190
191 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
192 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
193 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
194 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
195 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
196 {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
197 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
198 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
199
200 {SENSOR, OV7660_COM7, 0x80},
201 {SENSOR, OV7660_CLKRC, 0x80},
202 {SENSOR, OV7660_COM9, 0x4c},
203 {SENSOR, OV7660_OFON, 0x43},
204 {SENSOR, OV7660_COM12, 0x28},
205 {SENSOR, OV7660_COM8, 0x00},
206 {SENSOR, OV7660_COM10, 0x40},
207 {SENSOR, OV7660_HSTART, 0x0c},
208 {SENSOR, OV7660_HSTOP, 0x61},
209 {SENSOR, OV7660_HREF, 0xa4},
210 {SENSOR, OV7660_PSHFT, 0x0b},
211 {SENSOR, OV7660_VSTART, 0x01},
212 {SENSOR, OV7660_VSTOP, 0x7a},
213 {SENSOR, OV7660_VREF, 0x00},
214 {SENSOR, OV7660_COM7, 0x05},
215 {SENSOR, OV7660_COM6, 0x4b},
216 {SENSOR, OV7660_BBIAS, 0x98},
217 {SENSOR, OV7660_GbBIAS, 0x98},
218 {SENSOR, OV7660_RSVD29, 0x98},
219 {SENSOR, OV7660_RBIAS, 0x98},
220 {SENSOR, OV7660_COM1, 0x00},
221 {SENSOR, OV7660_AECHH, 0x00},
222 {SENSOR, OV7660_ADC, 0x04},
223 {SENSOR, OV7660_COM13, 0x00},
224 {SENSOR, OV7660_RSVDA1, 0x23},
225 {SENSOR, OV7660_TSLB, 0x0d},
226 {SENSOR, OV7660_HV, 0x80},
227 {SENSOR, OV7660_LCC1, 0x00},
228 {SENSOR, OV7660_LCC2, 0x00},
229 {SENSOR, OV7660_LCC3, 0x10},
230 {SENSOR, OV7660_LCC4, 0x40},
231 {SENSOR, OV7660_LCC5, 0x01},
232
233 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06},
234 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
235 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
236 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
237 {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81},
238 {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
239 {BRIDGE, M5602_XB_SIG_INI, 0x01},
240 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
241 {BRIDGE, M5602_XB_VSYNC_PARA, 0x08},
242 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
243 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
244 {BRIDGE, M5602_XB_VSYNC_PARA, 0x01},
245 {BRIDGE, M5602_XB_VSYNC_PARA, 0xe0}, /* 480 */
246 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
247 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
248 {BRIDGE, M5602_XB_SIG_INI, 0x00},
249 {BRIDGE, M5602_XB_SIG_INI, 0x02},
250 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
251 {BRIDGE, M5602_XB_VSYNC_PARA, 0x27}, /* 39 */
252 {BRIDGE, M5602_XB_VSYNC_PARA, 0x02},
253 {BRIDGE, M5602_XB_VSYNC_PARA, 0xa7}, /* 679 */
254 {BRIDGE, M5602_XB_SIG_INI, 0x00},
255
256 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
257 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
258
259 {SENSOR, OV7660_COM1, 0x00},
260 {SENSOR, OV7660_OFON, 0x0c},
261 {SENSOR, OV7660_COM2, 0x11}, /* Soft sleep, 2x Drive */
262 {SENSOR, OV7660_COM7, 0x05}, /* Raw RGB */
263
264 {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
265 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
266 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
267 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
268 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
269 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08},
270 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}
271};
272
273static const unsigned char init2_ov7660[][4] = {
274 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
275 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
276 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
277 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
278 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
279 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d},
280 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
281 {BRIDGE, M5602_XB_GPIO_DIR, 0x01}, 152 {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
282 {BRIDGE, M5602_XB_GPIO_DIR, 0x01}, 153 {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
283 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, 154 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},