Lines Matching +full:0 +full:xb0

20 	{BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
21 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
22 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
23 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
24 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
25 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00},
26 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00},
28 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
29 {BRIDGE, M5602_XB_GPIO_DAT, 0x08, 0x00},
30 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0xb0, 0x00},
31 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0x80, 0x00},
32 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3f, 0x00},
33 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3f, 0x00},
34 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
35 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
36 {BRIDGE, M5602_XB_GPIO_DAT, 0x00, 0x00},
37 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
38 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
39 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
40 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
41 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
42 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
43 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08, 0x00},
45 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
46 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
47 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
48 {BRIDGE, M5602_XB_GPIO_DAT, 0x14, 0x00},
49 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
50 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xf0, 0x00},
51 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
52 {BRIDGE, M5602_XB_GPIO_DAT, 0x1c, 0x00},
53 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
54 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06, 0x00},
55 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
56 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
57 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x20, 0x00},
59 {SENSOR, S5K4AA_PAGE_MAP, 0x00, 0x00}
63 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
64 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
65 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
66 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
67 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
68 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00},
69 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00},
71 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
72 {BRIDGE, M5602_XB_GPIO_DAT, 0x08, 0x00},
73 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0xb0, 0x00},
74 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0x80, 0x00},
75 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3f, 0x00},
76 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3f, 0x00},
77 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
78 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
79 {BRIDGE, M5602_XB_GPIO_DAT, 0x00, 0x00},
80 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
81 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
82 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
83 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
84 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
85 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
86 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08, 0x00},
88 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
89 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
90 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
91 {BRIDGE, M5602_XB_GPIO_DAT, 0x14, 0x00},
92 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
93 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xf0, 0x00},
94 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
95 {BRIDGE, M5602_XB_GPIO_DAT, 0x1c, 0x00},
96 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
97 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06, 0x00},
98 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
99 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
100 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x20, 0x00},
102 {SENSOR, S5K4AA_PAGE_MAP, 0x07, 0x00},
103 {SENSOR, 0x36, 0x01, 0x00},
104 {SENSOR, S5K4AA_PAGE_MAP, 0x00, 0x00},
105 {SENSOR, 0x7b, 0xff, 0x00},
106 {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
107 {SENSOR, 0x0c, 0x05, 0x00},
108 {SENSOR, 0x02, 0x0e, 0x00},
109 {SENSOR, S5K4AA_READ_MODE, 0xa0, 0x00},
110 {SENSOR, 0x37, 0x00, 0x00},
114 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
115 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
116 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
117 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08, 0x00},
118 {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
119 {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
120 {BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
121 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
122 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
123 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
124 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
125 /* VSYNC_PARA, VSYNC_PARA : img height 480 = 0x01e0 */
126 {BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
127 {BRIDGE, M5602_XB_VSYNC_PARA, 0xe0, 0x00},
128 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
129 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
130 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
131 {BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
132 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
133 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
134 /* HSYNC_PARA, HSYNC_PARA : img width 640 = 0x0280 */
135 {BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
136 {BRIDGE, M5602_XB_HSYNC_PARA, 0x80, 0x00},
137 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
138 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
139 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xa0, 0x00}, /* 48 MHz */
141 {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
143 | S5K4AA_RM_COL_SKIP_2X, 0x00},
144 /* 0x37 : Fix image stability when light is too bright and improves
146 {SENSOR, 0x37, 0x01, 0x00},
147 /* ROWSTART_HI, ROWSTART_LO : 10 + (1024-960)/2 = 42 = 0x002a */
148 {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00},
149 {SENSOR, S5K4AA_ROWSTART_LO, 0x29, 0x00},
150 {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00},
151 {SENSOR, S5K4AA_COLSTART_LO, 0x0c, 0x00},
152 /* window_height_hi, window_height_lo : 960 = 0x03c0 */
153 {SENSOR, S5K4AA_WINDOW_HEIGHT_HI, 0x03, 0x00},
154 {SENSOR, S5K4AA_WINDOW_HEIGHT_LO, 0xc0, 0x00},
155 /* window_width_hi, window_width_lo : 1280 = 0x0500 */
156 {SENSOR, S5K4AA_WINDOW_WIDTH_HI, 0x05, 0x00},
157 {SENSOR, S5K4AA_WINDOW_WIDTH_LO, 0x00, 0x00},
158 {SENSOR, S5K4AA_H_BLANK_HI__, 0x00, 0x00},
159 {SENSOR, S5K4AA_H_BLANK_LO__, 0xa8, 0x00}, /* helps to sync... */
160 {SENSOR, S5K4AA_EXPOSURE_HI, 0x01, 0x00},
161 {SENSOR, S5K4AA_EXPOSURE_LO, 0x00, 0x00},
162 {SENSOR, 0x11, 0x04, 0x00},
163 {SENSOR, 0x12, 0xc3, 0x00},
164 {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
165 {SENSOR, 0x02, 0x0e, 0x00},
169 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
170 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
171 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
172 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08, 0x00},
173 {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
174 {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
175 {BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
176 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
177 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
178 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
179 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
180 /* VSYNC_PARA, VSYNC_PARA : img height 1024 = 0x0400 */
181 {BRIDGE, M5602_XB_VSYNC_PARA, 0x04, 0x00},
182 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
183 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
184 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
185 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
186 {BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
187 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
188 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
189 /* HSYNC_PARA, HSYNC_PARA : img width 1280 = 0x0500 */
190 {BRIDGE, M5602_XB_HSYNC_PARA, 0x05, 0x00},
191 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
192 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
193 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
194 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xa0, 0x00}, /* 48 MHz */
196 {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
197 {SENSOR, S5K4AA_READ_MODE, S5K4AA_RM_H_FLIP, 0x00},
198 {SENSOR, 0x37, 0x01, 0x00},
199 {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00},
200 {SENSOR, S5K4AA_ROWSTART_LO, 0x09, 0x00},
201 {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00},
202 {SENSOR, S5K4AA_COLSTART_LO, 0x0a, 0x00},
203 {SENSOR, S5K4AA_WINDOW_HEIGHT_HI, 0x04, 0x00},
204 {SENSOR, S5K4AA_WINDOW_HEIGHT_LO, 0x00, 0x00},
205 {SENSOR, S5K4AA_WINDOW_WIDTH_HI, 0x05, 0x00},
206 {SENSOR, S5K4AA_WINDOW_WIDTH_LO, 0x00, 0x00},
207 {SENSOR, S5K4AA_H_BLANK_HI__, 0x01, 0x00},
208 {SENSOR, S5K4AA_H_BLANK_LO__, 0xa8, 0x00},
209 {SENSOR, S5K4AA_EXPOSURE_HI, 0x01, 0x00},
210 {SENSOR, S5K4AA_EXPOSURE_LO, 0x00, 0x00},
211 {SENSOR, 0x11, 0x04, 0x00},
212 {SENSOR, 0x12, 0xc3, 0x00},
213 {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
214 {SENSOR, 0x02, 0x0e, 0x00},
324 .priv = 0
335 .priv = 0
341 u8 prod_id[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; in s5k4aa_probe()
342 const u8 expected_prod_id[6] = {0x00, 0x10, 0x00, 0x4b, 0x33, 0x75}; in s5k4aa_probe()
344 int i, err = 0; in s5k4aa_probe()
359 for (i = 0; i < ARRAY_SIZE(preinit_s5k4aa) && !err; i++) { in s5k4aa_probe()
360 u8 data[2] = {0x00, 0x00}; in s5k4aa_probe()
362 switch (preinit_s5k4aa[i][0]) { in s5k4aa_probe()
370 data[0] = preinit_s5k4aa[i][2]; in s5k4aa_probe()
377 data[0] = preinit_s5k4aa[i][2]; in s5k4aa_probe()
390 if (m5602_read_sensor(sd, 0x00, prod_id, 2)) in s5k4aa_probe()
392 if (m5602_read_sensor(sd, 0x02, prod_id+2, 2)) in s5k4aa_probe()
394 if (m5602_read_sensor(sd, 0x04, prod_id+4, 2)) in s5k4aa_probe()
406 return 0; in s5k4aa_probe()
411 int i, err = 0; in s5k4aa_start()
420 for (i = 0; i < ARRAY_SIZE(SXGA_s5k4aa); i++) { in s5k4aa_start()
421 switch (SXGA_s5k4aa[i][0]) { in s5k4aa_start()
429 data[0] = SXGA_s5k4aa[i][2]; in s5k4aa_start()
436 data[0] = SXGA_s5k4aa[i][2]; in s5k4aa_start()
453 for (i = 0; i < ARRAY_SIZE(VGA_s5k4aa); i++) { in s5k4aa_start()
454 switch (VGA_s5k4aa[i][0]) { in s5k4aa_start()
462 data[0] = VGA_s5k4aa[i][2]; in s5k4aa_start()
469 data[0] = VGA_s5k4aa[i][2]; in s5k4aa_start()
483 if (err < 0) in s5k4aa_start()
486 return 0; in s5k4aa_start()
491 int i, err = 0; in s5k4aa_init()
493 for (i = 0; i < ARRAY_SIZE(init_s5k4aa) && !err; i++) { in s5k4aa_init()
494 u8 data[2] = {0x00, 0x00}; in s5k4aa_init()
496 switch (init_s5k4aa[i][0]) { in s5k4aa_init()
504 data[0] = init_s5k4aa[i][2]; in s5k4aa_init()
510 data[0] = init_s5k4aa[i][2]; in s5k4aa_init()
535 0, 0x1f, 1, S5K4AA_DEFAULT_BRIGHTNESS); in s5k4aa_init_controls()
538 13, 0xfff, 1, 0x100); in s5k4aa_init_controls()
541 0, 127, 1, S5K4AA_DEFAULT_GAIN); in s5k4aa_init_controls()
544 0, 1, 1, 1); in s5k4aa_init_controls()
547 0, 1, 1, 0); in s5k4aa_init_controls()
549 0, 1, 1, 0); in s5k4aa_init_controls()
558 return 0; in s5k4aa_init_controls()
569 if (err < 0) in s5k4aa_set_exposure()
571 data = (val >> 8) & 0xff; in s5k4aa_set_exposure()
573 if (err < 0) in s5k4aa_set_exposure()
575 data = val & 0xff; in s5k4aa_set_exposure()
591 if (err < 0) in s5k4aa_set_hvflip()
595 if (err < 0) in s5k4aa_set_hvflip()
603 data = (data & 0x7f) | (vflip << 7) | (hflip << 6); in s5k4aa_set_hvflip()
605 if (err < 0) in s5k4aa_set_hvflip()
609 if (err < 0) in s5k4aa_set_hvflip()
612 data &= 0xfe; in s5k4aa_set_hvflip()
614 data |= 0x01; in s5k4aa_set_hvflip()
616 if (err < 0) in s5k4aa_set_hvflip()
620 if (err < 0) in s5k4aa_set_hvflip()
623 data &= 0xfe; in s5k4aa_set_hvflip()
625 data |= 0x01; in s5k4aa_set_hvflip()
627 if (err < 0) in s5k4aa_set_hvflip()
630 return 0; in s5k4aa_set_hvflip()
641 if (err < 0) in s5k4aa_set_gain()
644 data = val & 0xff; in s5k4aa_set_gain()
658 if (err < 0) in s5k4aa_set_brightness()
661 data = val & 0xff; in s5k4aa_set_brightness()
673 if (err < 0) in s5k4aa_set_noise()
676 data = val & 0x01; in s5k4aa_set_noise()
687 return 0; in s5k4aa_s_ctrl()
722 for (page = 0; page < 16; page++) { in s5k4aa_dump_registers()
724 pr_info("Dumping the s5k4aa register state for page 0x%x\n", in s5k4aa_dump_registers()
726 for (address = 0; address <= 0xff; address++) { in s5k4aa_dump_registers()
727 u8 value = 0; in s5k4aa_dump_registers()
729 pr_info("register 0x%x contains 0x%x\n", in s5k4aa_dump_registers()
735 for (page = 0; page < 16; page++) { in s5k4aa_dump_registers()
737 pr_info("Probing for which registers that are read/write for page 0x%x\n", in s5k4aa_dump_registers()
739 for (address = 0; address <= 0xff; address++) { in s5k4aa_dump_registers()
740 u8 old_value, ctrl_value, test_value = 0xff; in s5k4aa_dump_registers()
747 pr_info("register 0x%x is writeable\n", in s5k4aa_dump_registers()
750 pr_info("register 0x%x is read only\n", in s5k4aa_dump_registers()