2 * Driver for the po1030 sensor.
4 * Copyright (c) 2008 Erik Andrén
5 * Copyright (c) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
6 * Copyright (c) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br>
8 * Portions of code to USB interface and ALi driver software,
9 * Copyright (c) 2006 Willem Duinker
10 * v4l2 interface modeled after the V4L2 driver
11 * for SN9C10x PC Camera Controllers
13 * Register defines taken from Pascal Stangs Procyon Armlib
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation, version 2.
21 #ifndef M5602_PO1030_H_
22 #define M5602_PO1030_H_
24 #include "m5602_sensor.h"
26 /*****************************************************************************/
28 #define PO1030_REG_DEVID_H 0x00
29 #define PO1030_REG_DEVID_L 0x01
30 #define PO1030_REG_FRAMEWIDTH_H 0x04
31 #define PO1030_REG_FRAMEWIDTH_L 0x05
32 #define PO1030_REG_FRAMEHEIGHT_H 0x06
33 #define PO1030_REG_FRAMEHEIGHT_L 0x07
34 #define PO1030_REG_WINDOWX_H 0x08
35 #define PO1030_REG_WINDOWX_L 0x09
36 #define PO1030_REG_WINDOWY_H 0x0a
37 #define PO1030_REG_WINDOWY_L 0x0b
38 #define PO1030_REG_WINDOWWIDTH_H 0x0c
39 #define PO1030_REG_WINDOWWIDTH_L 0x0d
40 #define PO1030_REG_WINDOWHEIGHT_H 0x0e
41 #define PO1030_REG_WINDOWHEIGHT_L 0x0f
43 #define PO1030_REG_GLOBALIBIAS 0x12
44 #define PO1030_REG_PIXELIBIAS 0x13
46 #define PO1030_REG_GLOBALGAIN 0x15
47 #define PO1030_REG_RED_GAIN 0x16
48 #define PO1030_REG_GREEN_1_GAIN 0x17
49 #define PO1030_REG_BLUE_GAIN 0x18
50 #define PO1030_REG_GREEN_2_GAIN 0x19
52 #define PO1030_REG_INTEGLINES_H 0x1a
53 #define PO1030_REG_INTEGLINES_M 0x1b
54 #define PO1030_REG_INTEGLINES_L 0x1c
56 #define PO1030_REG_CONTROL1 0x1d
57 #define PO1030_REG_CONTROL2 0x1e
58 #define PO1030_REG_CONTROL3 0x1f
59 #define PO1030_REG_CONTROL4 0x20
61 #define PO1030_REG_PERIOD50_H 0x23
62 #define PO1030_REG_PERIOD50_L 0x24
63 #define PO1030_REG_PERIOD60_H 0x25
64 #define PO1030_REG_PERIOD60_L 0x26
65 #define PO1030_REG_REGCLK167 0x27
66 #define PO1030_REG_DELTA50 0x28
67 #define PO1030_REG_DELTA60 0x29
69 #define PO1030_REG_ADCOFFSET 0x2c
71 /* Gamma Correction Coeffs */
72 #define PO1030_REG_GC0 0x2d
73 #define PO1030_REG_GC1 0x2e
74 #define PO1030_REG_GC2 0x2f
75 #define PO1030_REG_GC3 0x30
76 #define PO1030_REG_GC4 0x31
77 #define PO1030_REG_GC5 0x32
78 #define PO1030_REG_GC6 0x33
79 #define PO1030_REG_GC7 0x34
81 /* Color Transform Matrix */
82 #define PO1030_REG_CT0 0x35
83 #define PO1030_REG_CT1 0x36
84 #define PO1030_REG_CT2 0x37
85 #define PO1030_REG_CT3 0x38
86 #define PO1030_REG_CT4 0x39
87 #define PO1030_REG_CT5 0x3a
88 #define PO1030_REG_CT6 0x3b
89 #define PO1030_REG_CT7 0x3c
90 #define PO1030_REG_CT8 0x3d
92 #define PO1030_REG_AUTOCTRL1 0x3e
93 #define PO1030_REG_AUTOCTRL2 0x3f
95 #define PO1030_REG_YTARGET 0x40
96 #define PO1030_REG_GLOBALGAINMIN 0x41
97 #define PO1030_REG_GLOBALGAINMAX 0x42
99 /* Output format control */
100 #define PO1030_REG_OUTFORMCTRL1 0x5a
101 #define PO1030_REG_OUTFORMCTRL2 0x5b
102 #define PO1030_REG_OUTFORMCTRL3 0x5c
103 #define PO1030_REG_OUTFORMCTRL4 0x5d
104 #define PO1030_REG_OUTFORMCTRL5 0x5e
106 /* Imaging coefficients */
107 #define PO1030_REG_YBRIGHT 0x73
108 #define PO1030_REG_YCONTRAST 0x74
109 #define PO1030_REG_YSATURATION 0x75
111 #define PO1030_HFLIP (1 << 7)
112 #define PO1030_VFLIP (1 << 6)
114 /*****************************************************************************/
116 #define PO1030_GLOBAL_GAIN_DEFAULT 0x12
117 #define PO1030_EXPOSURE_DEFAULT 0x0085
118 #define PO1030_BLUE_GAIN_DEFAULT 0x40
119 #define PO1030_RED_GAIN_DEFAULT 0x40
121 /*****************************************************************************/
123 /* Kernel module parameters */
124 extern int force_sensor
;
125 extern int dump_sensor
;
127 int po1030_probe(struct sd
*sd
);
128 int po1030_init(struct sd
*sd
);
129 int po1030_power_down(struct sd
*sd
);
131 int po1030_get_exposure(struct gspca_dev
*gspca_dev
, __s32
*val
);
132 int po1030_set_exposure(struct gspca_dev
*gspca_dev
, __s32 val
);
133 int po1030_get_gain(struct gspca_dev
*gspca_dev
, __s32
*val
);
134 int po1030_set_gain(struct gspca_dev
*gspca_dev
, __s32 val
);
135 int po1030_get_red_balance(struct gspca_dev
*gspca_dev
, __s32
*val
);
136 int po1030_set_red_balance(struct gspca_dev
*gspca_dev
, __s32 val
);
137 int po1030_get_blue_balance(struct gspca_dev
*gspca_dev
, __s32
*val
);
138 int po1030_set_blue_balance(struct gspca_dev
*gspca_dev
, __s32 val
);
139 int po1030_get_hflip(struct gspca_dev
*gspca_dev
, __s32
*val
);
140 int po1030_set_hflip(struct gspca_dev
*gspca_dev
, __s32 val
);
141 int po1030_get_vflip(struct gspca_dev
*gspca_dev
, __s32
*val
);
142 int po1030_set_vflip(struct gspca_dev
*gspca_dev
, __s32 val
);
144 static struct ctrl po1030_ctrls
[] = {
148 .type
= V4L2_CTRL_TYPE_INTEGER
,
153 .default_value
= PO1030_GLOBAL_GAIN_DEFAULT
,
154 .flags
= V4L2_CTRL_FLAG_SLIDER
156 .set
= po1030_set_gain
,
157 .get
= po1030_get_gain
160 .id
= V4L2_CID_EXPOSURE
,
161 .type
= V4L2_CTRL_TYPE_INTEGER
,
166 .default_value
= PO1030_EXPOSURE_DEFAULT
,
167 .flags
= V4L2_CTRL_FLAG_SLIDER
169 .set
= po1030_set_exposure
,
170 .get
= po1030_get_exposure
173 .id
= V4L2_CID_RED_BALANCE
,
174 .type
= V4L2_CTRL_TYPE_INTEGER
,
175 .name
= "red balance",
179 .default_value
= PO1030_RED_GAIN_DEFAULT
,
180 .flags
= V4L2_CTRL_FLAG_SLIDER
182 .set
= po1030_set_red_balance
,
183 .get
= po1030_get_red_balance
186 .id
= V4L2_CID_BLUE_BALANCE
,
187 .type
= V4L2_CTRL_TYPE_INTEGER
,
188 .name
= "blue balance",
192 .default_value
= PO1030_BLUE_GAIN_DEFAULT
,
193 .flags
= V4L2_CTRL_FLAG_SLIDER
195 .set
= po1030_set_blue_balance
,
196 .get
= po1030_get_blue_balance
199 .id
= V4L2_CID_HFLIP
,
200 .type
= V4L2_CTRL_TYPE_BOOLEAN
,
201 .name
= "horizontal flip",
207 .set
= po1030_set_hflip
,
208 .get
= po1030_get_hflip
211 .id
= V4L2_CID_VFLIP
,
212 .type
= V4L2_CTRL_TYPE_BOOLEAN
,
213 .name
= "vertical flip",
219 .set
= po1030_set_vflip
,
220 .get
= po1030_get_vflip
224 static struct m5602_sensor po1030
= {
227 .i2c_slave_id
= 0xdc,
230 .probe
= po1030_probe
,
232 .power_down
= po1030_power_down
,
234 .ctrls
= po1030_ctrls
,
239 M5602_DEFAULT_FRAME_WIDTH
,
240 M5602_DEFAULT_FRAME_HEIGHT
,
244 M5602_DEFAULT_FRAME_WIDTH
* M5602_DEFAULT_FRAME_HEIGHT
,
245 .bytesperline
= M5602_DEFAULT_FRAME_WIDTH
,
246 .colorspace
= V4L2_COLORSPACE_SRGB
,
252 static const unsigned char preinit_po1030
[][3] =
254 {BRIDGE
, M5602_XB_MCU_CLK_DIV
, 0x02},
255 {BRIDGE
, M5602_XB_MCU_CLK_CTRL
, 0xb0},
256 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x00},
257 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
258 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
259 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0d},
260 {BRIDGE
, M5602_XB_SENSOR_CTRL
, 0x00},
261 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
262 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
264 {SENSOR
, PO1030_REG_AUTOCTRL2
, 0x24},
266 {BRIDGE
, M5602_XB_GPIO_DIR
, 0x05},
267 {BRIDGE
, M5602_XB_GPIO_DAT
, 0x04},
268 {BRIDGE
, M5602_XB_GPIO_EN_H
, 0x06},
269 {BRIDGE
, M5602_XB_GPIO_DIR_H
, 0x06},
270 {BRIDGE
, M5602_XB_GPIO_DAT_H
, 0x02},
271 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x04},
272 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
273 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x06},
274 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
275 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
276 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
277 {BRIDGE
, M5602_XB_LINE_OF_FRAME_H
, 0x81},
278 {BRIDGE
, M5602_XB_PIX_OF_LINE_H
, 0x82},
279 {BRIDGE
, M5602_XB_SIG_INI
, 0x01},
280 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
281 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x02},
282 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
283 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
284 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x01},
285 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0xec},
286 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
287 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
288 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
289 {BRIDGE
, M5602_XB_SIG_INI
, 0x02},
290 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x00},
291 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x00},
292 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x02},
293 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x87},
294 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
296 {SENSOR
, PO1030_REG_AUTOCTRL2
, 0x24},
298 {BRIDGE
, M5602_XB_GPIO_DIR
, 0x05},
299 {BRIDGE
, M5602_XB_GPIO_DAT
, 0x04},
300 {BRIDGE
, M5602_XB_GPIO_EN_H
, 0x06},
301 {BRIDGE
, M5602_XB_GPIO_DIR_H
, 0x06},
302 {BRIDGE
, M5602_XB_GPIO_DAT_H
, 0x02},
303 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x04},
304 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
305 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x00},
306 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
307 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
308 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
309 {BRIDGE
, M5602_XB_GPIO_DIR
, 0x05},
310 {BRIDGE
, M5602_XB_GPIO_DAT
, 0x00}
313 static const unsigned char init_po1030
[][4] =
315 {BRIDGE
, M5602_XB_MCU_CLK_DIV
, 0x02},
316 {BRIDGE
, M5602_XB_MCU_CLK_CTRL
, 0xb0},
318 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x00},
319 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
320 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
321 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0d},
323 {BRIDGE
, M5602_XB_SENSOR_CTRL
, 0x00},
324 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
325 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
326 /*end of sequence 1*/
328 /*sequence 2 (same as stop sequence)*/
329 {SENSOR
, PO1030_REG_AUTOCTRL2
, 0x24},
330 {BRIDGE
, M5602_XB_GPIO_DIR
, 0x05},
331 {BRIDGE
, M5602_XB_GPIO_DAT
, 0x04},
332 {BRIDGE
, M5602_XB_GPIO_EN_H
, 0x06},
333 {BRIDGE
, M5602_XB_GPIO_DIR_H
, 0x06},
334 {BRIDGE
, M5602_XB_GPIO_DAT_H
, 0x02},
336 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x04},
337 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
338 /*end of sequence 2*/
341 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x06},
342 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
343 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
344 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
345 {BRIDGE
, M5602_XB_LINE_OF_FRAME_H
, 0x81},
346 {BRIDGE
, M5602_XB_PIX_OF_LINE_H
, 0x82},
347 {BRIDGE
, M5602_XB_SIG_INI
, 0x01},
348 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
349 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x02},
350 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
351 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
352 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x01},
353 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0xec},
354 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
355 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
356 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
357 {BRIDGE
, M5602_XB_SIG_INI
, 0x02},
358 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x00},
359 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x00},
360 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x02},
361 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x87},
362 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
363 /*end of sequence 5*/
366 {SENSOR
, PO1030_REG_AUTOCTRL2
, 0x24},
368 {BRIDGE
, M5602_XB_GPIO_DIR
, 0x05},
369 {BRIDGE
, M5602_XB_GPIO_DAT
, 0x04},
370 {BRIDGE
, M5602_XB_GPIO_EN_H
, 0x06},
371 {BRIDGE
, M5602_XB_GPIO_DIR_H
, 0x06},
372 {BRIDGE
, M5602_XB_GPIO_DAT_H
, 0x02},
373 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x04},
374 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
375 /*end of sequence 2 stop */
377 /* ---------------------------------
378 * end of init - begin of start
379 * --------------------------------- */
382 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x00},
383 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
384 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
385 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
386 /*end of sequence 3*/
388 {BRIDGE
, M5602_XB_GPIO_DIR
, 0x05},
389 {BRIDGE
, M5602_XB_GPIO_DAT
, 0x00},
390 {BRIDGE
, M5602_XB_GPIO_EN_H
, 0x06},
391 {BRIDGE
, M5602_XB_GPIO_EN_L
, 0x00},
393 {SENSOR
, PO1030_REG_AUTOCTRL2
, 0x04},
395 /* Set the width to 751 */
396 {SENSOR
, PO1030_REG_FRAMEWIDTH_H
, 0x02},
397 {SENSOR
, PO1030_REG_FRAMEWIDTH_L
, 0xef},
399 /* Set the height to 540 */
400 {SENSOR
, PO1030_REG_FRAMEHEIGHT_H
, 0x02},
401 {SENSOR
, PO1030_REG_FRAMEHEIGHT_L
, 0x1c},
403 /* Set the x window to 1 */
404 {SENSOR
, PO1030_REG_WINDOWX_H
, 0x00},
405 {SENSOR
, PO1030_REG_WINDOWX_L
, 0x01},
407 /* Set the y window to 1 */
408 {SENSOR
, PO1030_REG_WINDOWY_H
, 0x00},
409 {SENSOR
, PO1030_REG_WINDOWY_L
, 0x01},
411 {SENSOR
, PO1030_REG_WINDOWWIDTH_H
, 0x02},
412 {SENSOR
, PO1030_REG_WINDOWWIDTH_L
, 0x87},
413 {SENSOR
, PO1030_REG_WINDOWHEIGHT_H
, 0x01},
414 {SENSOR
, PO1030_REG_WINDOWHEIGHT_L
, 0xe3},
416 {SENSOR
, PO1030_REG_OUTFORMCTRL2
, 0x04},
417 {SENSOR
, PO1030_REG_OUTFORMCTRL2
, 0x04},
418 {SENSOR
, PO1030_REG_AUTOCTRL1
, 0x08},
419 {SENSOR
, PO1030_REG_CONTROL2
, 0x03},
420 {SENSOR
, 0x21, 0x90},
421 {SENSOR
, PO1030_REG_YTARGET
, 0x60},
422 {SENSOR
, 0x59, 0x13},
423 {SENSOR
, PO1030_REG_OUTFORMCTRL1
, 0x40},
424 {SENSOR
, 0x5f, 0x00},
425 {SENSOR
, 0x60, 0x80},
426 {SENSOR
, 0x78, 0x14},
427 {SENSOR
, 0x6f, 0x01},
428 {SENSOR
, PO1030_REG_CONTROL1
, 0x18},
429 {SENSOR
, PO1030_REG_GLOBALGAINMAX
, 0x14},
430 {SENSOR
, 0x63, 0x38},
431 {SENSOR
, 0x64, 0x38},
432 {SENSOR
, PO1030_REG_CONTROL1
, 0x58},
433 {SENSOR
, PO1030_REG_RED_GAIN
, 0x30},
434 {SENSOR
, PO1030_REG_GREEN_1_GAIN
, 0x30},
435 {SENSOR
, PO1030_REG_BLUE_GAIN
, 0x30},
436 {SENSOR
, PO1030_REG_GREEN_2_GAIN
, 0x30},
437 {SENSOR
, PO1030_REG_GC0
, 0x10},
438 {SENSOR
, PO1030_REG_GC1
, 0x20},
439 {SENSOR
, PO1030_REG_GC2
, 0x40},
440 {SENSOR
, PO1030_REG_GC3
, 0x60},
441 {SENSOR
, PO1030_REG_GC4
, 0x80},
442 {SENSOR
, PO1030_REG_GC5
, 0xa0},
443 {SENSOR
, PO1030_REG_GC6
, 0xc0},
444 {SENSOR
, PO1030_REG_GC7
, 0xff},
445 /*end of sequence 4*/
447 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x06},
448 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
449 {BRIDGE
, M5602_XB_ADC_CTRL
, 0xc0},
450 {BRIDGE
, M5602_XB_SENSOR_TYPE
, 0x0c},
451 {BRIDGE
, M5602_XB_LINE_OF_FRAME_H
, 0x81},
452 {BRIDGE
, M5602_XB_PIX_OF_LINE_H
, 0x82},
453 {BRIDGE
, M5602_XB_SIG_INI
, 0x01},
454 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
455 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x02},
456 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
457 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
458 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x01},
459 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0xec},
460 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
461 {BRIDGE
, M5602_XB_VSYNC_PARA
, 0x00},
462 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
463 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
464 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x00},
465 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x00},
466 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x02},
467 {BRIDGE
, M5602_XB_HSYNC_PARA
, 0x7e},
468 {BRIDGE
, M5602_XB_SIG_INI
, 0x00},
469 /*end of sequence 5*/
472 /* Changing 40 in f0 the image becomes green in bayer mode and red in
474 {SENSOR
, PO1030_REG_RED_GAIN
, PO1030_RED_GAIN_DEFAULT
},
475 /* in changing 40 in f0 the image becomes green in bayer mode and red in
477 {SENSOR
, PO1030_REG_BLUE_GAIN
, PO1030_BLUE_GAIN_DEFAULT
},
479 /* with a very low lighted environment increase the exposure but
480 * decrease the FPS (Frame Per Second) */
481 {BRIDGE
, M5602_XB_SEN_CLK_DIV
, 0x00},
482 {BRIDGE
, M5602_XB_SEN_CLK_CTRL
, 0xb0},
484 /* Controls high exposure more than SENSOR_LOW_EXPOSURE, use only in
485 * low lighted environment (f0 is more than ff ?)*/
486 {SENSOR
, PO1030_REG_INTEGLINES_H
, ((PO1030_EXPOSURE_DEFAULT
>> 2)
489 /* Controls middle exposure, use only in high lighted environment */
490 {SENSOR
, PO1030_REG_INTEGLINES_M
, PO1030_EXPOSURE_DEFAULT
& 0xff},
492 /* Controls clarity (not sure) */
493 {SENSOR
, PO1030_REG_INTEGLINES_L
, 0x00},
494 /* Controls gain (the image is more lighted) */
495 {SENSOR
, PO1030_REG_GLOBALGAIN
, PO1030_GLOBAL_GAIN_DEFAULT
},
498 {SENSOR
, PO1030_REG_FRAMEWIDTH_H
, 0x02},
499 {SENSOR
, PO1030_REG_FRAMEWIDTH_L
, 0xef}
500 /*end of sequence 6*/