Lines Matching +full:0 +full:xb0

23 	{BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
24 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
25 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
26 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
27 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
28 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
29 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
30 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
31 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
32 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
33 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
34 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
35 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02},
39 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04},
40 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
41 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
42 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
43 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
44 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
45 {BRIDGE, M5602_XB_GPIO_DAT, 0x00}
49 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
50 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
51 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
52 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
53 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
54 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
55 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
59 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
60 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
61 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
62 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
63 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
64 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x02},
65 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x04},
66 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
67 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
68 {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
70 {SENSOR, PO1030_AUTOCTRL2, 0x04},
75 {SENSOR, PO1030_CONTROL2, 0x03},
76 {SENSOR, 0x21, 0x90},
77 {SENSOR, PO1030_YTARGET, 0x60},
78 {SENSOR, 0x59, 0x13},
80 {SENSOR, PO1030_EDGE_ENH_OFF, 0x00},
81 {SENSOR, PO1030_EGA, 0x80},
82 {SENSOR, 0x78, 0x14},
83 {SENSOR, 0x6f, 0x01},
84 {SENSOR, PO1030_GLOBALGAINMAX, 0x14},
85 {SENSOR, PO1030_Cb_U_GAIN, 0x38},
86 {SENSOR, PO1030_Cr_V_GAIN, 0x38},
90 {SENSOR, PO1030_GC0, 0x10},
91 {SENSOR, PO1030_GC1, 0x20},
92 {SENSOR, PO1030_GC2, 0x40},
93 {SENSOR, PO1030_GC3, 0x60},
94 {SENSOR, PO1030_GC4, 0x80},
95 {SENSOR, PO1030_GC5, 0xa0},
96 {SENSOR, PO1030_GC6, 0xc0},
97 {SENSOR, PO1030_GC7, 0xff},
100 {SENSOR, PO1030_FRAMEWIDTH_H, 0x02},
101 {SENSOR, PO1030_FRAMEWIDTH_L, 0xef},
104 {SENSOR, PO1030_FRAMEHEIGHT_H, 0x02},
105 {SENSOR, PO1030_FRAMEHEIGHT_L, 0x1c},
108 {SENSOR, PO1030_WINDOWX_H, 0x00},
109 {SENSOR, PO1030_WINDOWX_L, 0x01},
112 {SENSOR, PO1030_WINDOWY_H, 0x00},
113 {SENSOR, PO1030_WINDOWY_L, 0x01},
117 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
118 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
120 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
121 {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
122 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
123 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
148 .min = 0,
157 u8 dev_id_h = 0, i; in po1030_probe()
174 for (i = 0; i < ARRAY_SIZE(preinit_po1030); i++) { in po1030_probe()
176 if (preinit_po1030[i][0] == SENSOR) in po1030_probe()
182 if (err < 0) in po1030_probe()
189 if (dev_id_h == 0x30) { in po1030_probe()
199 return 0; in po1030_probe()
204 int i, err = 0; in po1030_init()
207 for (i = 0; i < ARRAY_SIZE(init_po1030) && !err; i++) { in po1030_init()
208 u8 data[2] = {0x00, 0x00}; in po1030_init()
210 switch (init_po1030[i][0]) { in po1030_init()
218 data[0] = init_po1030[i][2]; in po1030_init()
228 if (err < 0) in po1030_init()
234 return 0; in po1030_init()
246 0, 1, 1, 0); in po1030_init_controls()
249 V4L2_CID_RED_BALANCE, 0, 255, 1, in po1030_init_controls()
252 V4L2_CID_BLUE_BALANCE, 0, 255, 1, in po1030_init_controls()
256 V4L2_CID_EXPOSURE_AUTO, 1, 0, V4L2_EXPOSURE_MANUAL); in po1030_init_controls()
258 0, 0x2ff, 1, PO1030_EXPOSURE_DEFAULT); in po1030_init_controls()
260 sd->gain = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_GAIN, 0, in po1030_init_controls()
261 0x4f, 1, PO1030_GLOBAL_GAIN_DEFAULT); in po1030_init_controls()
264 0, 1, 1, 0); in po1030_init_controls()
266 0, 1, 1, 0); in po1030_init_controls()
273 v4l2_ctrl_auto_cluster(4, &sd->auto_white_bal, 0, false); in po1030_init_controls()
274 v4l2_ctrl_auto_cluster(2, &sd->autoexpo, 0, false); in po1030_init_controls()
277 return 0; in po1030_init_controls()
283 int i, err = 0; in po1030_start()
293 if (err < 0) in po1030_start()
296 data = ((width + 3) >> 8) & 0xff; in po1030_start()
298 if (err < 0) in po1030_start()
301 data = (width + 3) & 0xff; in po1030_start()
303 if (err < 0) in po1030_start()
306 data = ((height + 1) >> 8) & 0xff; in po1030_start()
308 if (err < 0) in po1030_start()
311 data = (height + 1) & 0xff; in po1030_start()
319 data = 0; in po1030_start()
321 if (err < 0) in po1030_start()
324 data = ((width + 7) >> 8) & 0xff; in po1030_start()
326 if (err < 0) in po1030_start()
329 data = (width + 7) & 0xff; in po1030_start()
331 if (err < 0) in po1030_start()
334 data = ((height + 3) >> 8) & 0xff; in po1030_start()
336 if (err < 0) in po1030_start()
339 data = (height + 3) & 0xff; in po1030_start()
346 err = m5602_write_bridge(sd, M5602_XB_SENSOR_TYPE, 0x0c); in po1030_start()
347 if (err < 0) in po1030_start()
350 err = m5602_write_bridge(sd, M5602_XB_LINE_OF_FRAME_H, 0x81); in po1030_start()
351 if (err < 0) in po1030_start()
354 err = m5602_write_bridge(sd, M5602_XB_PIX_OF_LINE_H, 0x82); in po1030_start()
355 if (err < 0) in po1030_start()
358 err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0x01); in po1030_start()
359 if (err < 0) in po1030_start()
363 ((ver_offs >> 8) & 0xff)); in po1030_start()
364 if (err < 0) in po1030_start()
367 err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (ver_offs & 0xff)); in po1030_start()
368 if (err < 0) in po1030_start()
371 for (i = 0; i < 2 && !err; i++) in po1030_start()
372 err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); in po1030_start()
373 if (err < 0) in po1030_start()
376 err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff); in po1030_start()
377 if (err < 0) in po1030_start()
380 err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff)); in po1030_start()
381 if (err < 0) in po1030_start()
384 for (i = 0; i < 2 && !err; i++) in po1030_start()
385 err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); in po1030_start()
387 for (i = 0; i < 2 && !err; i++) in po1030_start()
388 err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0); in po1030_start()
390 for (i = 0; i < 2 && !err; i++) in po1030_start()
391 err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0); in po1030_start()
392 if (err < 0) in po1030_start()
395 err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width >> 8) & 0xff); in po1030_start()
396 if (err < 0) in po1030_start()
399 err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width & 0xff)); in po1030_start()
400 if (err < 0) in po1030_start()
403 err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0); in po1030_start()
413 gspca_dbg(gspca_dev, D_CONF, "Set exposure to %d\n", val & 0xffff); in po1030_set_exposure()
415 i2c_data = ((val & 0xff00) >> 8); in po1030_set_exposure()
416 gspca_dbg(gspca_dev, D_CONF, "Set exposure to high byte to 0x%x\n", in po1030_set_exposure()
421 if (err < 0) in po1030_set_exposure()
424 i2c_data = (val & 0xff); in po1030_set_exposure()
425 gspca_dbg(gspca_dev, D_CONF, "Set exposure to low byte to 0x%x\n", in po1030_set_exposure()
439 i2c_data = val & 0xff; in po1030_set_gain()
455 if (err < 0) in po1030_set_hvflip()
458 i2c_data = (0x3f & i2c_data) | (sd->hflip->val << 7) | in po1030_set_hvflip()
473 i2c_data = val & 0xff; in po1030_set_red_balance()
486 i2c_data = val & 0xff; in po1030_set_blue_balance()
500 i2c_data = val & 0xff; in po1030_set_green_balance()
505 if (err < 0) in po1030_set_green_balance()
520 if (err < 0) in po1030_set_auto_white_balance()
524 i2c_data = (i2c_data & 0xfe) | (val & 0x01); in po1030_set_auto_white_balance()
537 if (err < 0) in po1030_set_auto_exposure()
542 i2c_data = (i2c_data & 0xfd) | ((val & 0x01) << 1); in po1030_set_auto_exposure()
559 return 0; in po1030_s_ctrl()
596 u8 value = 0; in po1030_dump_registers()
599 for (address = 0; address < 0x7f; address++) { in po1030_dump_registers()
601 pr_info("register 0x%x contains 0x%x\n", address, value); in po1030_dump_registers()
607 for (address = 0; address < 0xff; address++) { in po1030_dump_registers()
609 u8 test_value[2] = {0xff, 0xff}; in po1030_dump_registers()
615 if (ctrl_value == test_value[0]) in po1030_dump_registers()
616 pr_info("register 0x%x is writeable\n", address); in po1030_dump_registers()
618 pr_info("register 0x%x is read only\n", address); in po1030_dump_registers()