Lines Matching +full:0 +full:xb0

36 		.priv = 0
41 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
42 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
43 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
44 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
45 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
46 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00},
47 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00},
49 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
50 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
51 {BRIDGE, M5602_XB_GPIO_DAT, 0x08, 0x00},
52 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3f, 0x00},
53 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3f, 0x00},
54 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
55 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
56 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
57 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
58 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0xb0, 0x00},
59 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0x80, 0x00},
60 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
61 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
62 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
63 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
64 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
65 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
66 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
67 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xf0, 0x00},
68 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
69 {BRIDGE, M5602_XB_GPIO_DAT, 0x1c, 0x00},
70 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
71 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06, 0x00},
72 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
73 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
74 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x20, 0x00},
83 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
84 {BRIDGE, M5602_XB_GPIO_DAT, 0x08, 0x00},
85 {BRIDGE, M5602_XB_GPIO_EN_H, 0x3f, 0x00},
86 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x3f, 0x00},
87 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
88 {BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
89 {BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
90 {BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
91 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0xb0, 0x00},
92 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0x80, 0x00},
93 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
94 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
95 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
96 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
97 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00},
98 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00},
99 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
100 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xf0, 0x00},
101 {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
102 {BRIDGE, M5602_XB_GPIO_DAT, 0x08, 0x00},
103 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
104 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06, 0x00},
105 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
106 {BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
107 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x20, 0x00},
109 {SENSOR, S5K83A_PAGE_MAP, 0x04, 0x00},
110 {SENSOR, 0xaf, 0x01, 0x00},
111 {SENSOR, S5K83A_PAGE_MAP, 0x00, 0x00},
112 {SENSOR, 0x7b, 0xff, 0x00},
113 {SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
114 {SENSOR, 0x01, 0x50, 0x00},
115 {SENSOR, 0x12, 0x20, 0x00},
116 {SENSOR, 0x17, 0x40, 0x00},
117 {SENSOR, 0x1c, 0x00, 0x00},
118 {SENSOR, 0x02, 0x70, 0x00},
119 {SENSOR, 0x03, 0x0b, 0x00},
120 {SENSOR, 0x04, 0xf0, 0x00},
121 {SENSOR, 0x05, 0x0b, 0x00},
122 {SENSOR, 0x06, 0x71, 0x00},
123 {SENSOR, 0x07, 0xe8, 0x00}, /* 488 */
124 {SENSOR, 0x08, 0x02, 0x00},
125 {SENSOR, 0x09, 0x88, 0x00}, /* 648 */
126 {SENSOR, 0x14, 0x00, 0x00},
127 {SENSOR, 0x15, 0x20, 0x00}, /* 32 */
128 {SENSOR, 0x19, 0x00, 0x00},
129 {SENSOR, 0x1a, 0x98, 0x00}, /* 152 */
130 {SENSOR, 0x0f, 0x02, 0x00},
131 {SENSOR, 0x10, 0xe5, 0x00}, /* 741 */
134 {SENSOR, 0x00, 0x06, 0x00},
138 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
139 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
140 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
141 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
142 {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
143 {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
144 {BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
145 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
146 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
147 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
148 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
149 {BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
150 {BRIDGE, M5602_XB_VSYNC_PARA, 0xe4, 0x00}, /* 484 */
151 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
152 {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
153 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
154 {BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
155 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
156 {BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
157 {BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
158 {BRIDGE, M5602_XB_HSYNC_PARA, 0x7f, 0x00}, /* 639 */
159 {BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
160 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
161 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
172 u8 prod_id = 0, ver_id = 0; in s5k83a_probe()
173 int i, err = 0; in s5k83a_probe()
189 for (i = 0; i < ARRAY_SIZE(preinit_s5k83a) && !err; i++) { in s5k83a_probe()
191 if (preinit_s5k83a[i][0] == SENSOR) in s5k83a_probe()
196 data[0]); in s5k83a_probe()
202 if (m5602_read_sensor(sd, 0x00, &prod_id, 1)) in s5k83a_probe()
205 if (m5602_read_sensor(sd, 0x01, &ver_id, 1)) in s5k83a_probe()
208 if ((prod_id == 0xff) || (ver_id == 0xff)) in s5k83a_probe()
220 return 0; in s5k83a_probe()
225 int i, err = 0; in s5k83a_init()
227 for (i = 0; i < ARRAY_SIZE(init_s5k83a) && !err; i++) { in s5k83a_init()
228 u8 data[2] = {0x00, 0x00}; in s5k83a_init()
230 switch (init_s5k83a[i][0]) { in s5k83a_init()
238 data[0] = init_s5k83a[i][2]; in s5k83a_init()
244 data[0] = init_s5k83a[i][2]; in s5k83a_init()
269 0, 255, 1, S5K83A_DEFAULT_BRIGHTNESS); in s5k83a_init_controls()
272 0, S5K83A_MAXIMUM_EXPOSURE, 1, in s5k83a_init_controls()
276 0, 255, 1, S5K83A_DEFAULT_GAIN); in s5k83a_init_controls()
279 0, 1, 1, 0); in s5k83a_init_controls()
281 0, 1, 1, 0); in s5k83a_init_controls()
290 return 0; in s5k83a_init_controls()
296 u8 reg, previous_rotation = 0; in rotation_thread_function()
332 return 0; in rotation_thread_function()
337 int i, err = 0; in s5k83a_start()
351 for (i = 0; i < ARRAY_SIZE(start_s5k83a) && !err; i++) { in s5k83a_start()
353 if (start_s5k83a[i][0] == SENSOR) in s5k83a_start()
358 data[0]); in s5k83a_start()
360 if (err < 0) in s5k83a_start()
371 return s5k83a_set_led_indication(sd, 0); in s5k83a_stop()
387 data[0] = 0x00; in s5k83a_set_gain()
388 data[1] = 0x20; in s5k83a_set_gain()
389 err = m5602_write_sensor(sd, 0x14, data, 2); in s5k83a_set_gain()
390 if (err < 0) in s5k83a_set_gain()
393 data[0] = 0x01; in s5k83a_set_gain()
394 data[1] = 0x00; in s5k83a_set_gain()
395 err = m5602_write_sensor(sd, 0x0d, data, 2); in s5k83a_set_gain()
396 if (err < 0) in s5k83a_set_gain()
401 data[0] = val >> 3; /* gain, high 5 bits */ in s5k83a_set_gain()
413 data[0] = val; in s5k83a_set_brightness()
422 data[0] = 0; in s5k83a_set_exposure()
434 data[0] = 0x05; in s5k83a_set_flip_real()
436 if (err < 0) in s5k83a_set_flip_real()
440 data[0] = S5K83A_FLIP_MASK; in s5k83a_set_flip_real()
441 data[0] = (vflip) ? data[0] | 0x40 : data[0]; in s5k83a_set_flip_real()
442 data[0] = (hflip) ? data[0] | 0x80 : data[0]; in s5k83a_set_flip_real()
445 if (err < 0) in s5k83a_set_flip_real()
448 data[0] = (vflip) ? 0x0b : 0x0a; in s5k83a_set_flip_real()
450 if (err < 0) in s5k83a_set_flip_real()
453 data[0] = (hflip) ? 0x0a : 0x0b; in s5k83a_set_flip_real()
467 if (err < 0) in s5k83a_set_hvflip()
485 return 0; in s5k83a_s_ctrl()
509 int err = 0; in s5k83a_set_led_indication()
513 if (err < 0) in s5k83a_set_led_indication()
517 data[0] = data[0] | S5K83A_GPIO_LED_MASK; in s5k83a_set_led_indication()
519 data[0] = data[0] & ~S5K83A_GPIO_LED_MASK; in s5k83a_set_led_indication()
521 err = m5602_write_bridge(sd, M5602_XB_GPIO_DAT, data[0]); in s5k83a_set_led_indication()
530 *reg_data = (*reg_data & S5K83A_GPIO_ROTATION_MASK) ? 0 : 1; in s5k83a_get_rotation()
540 for (page = 0; page < 16; page++) { in s5k83a_dump_registers()
542 pr_info("Dumping the s5k83a register state for page 0x%x\n", in s5k83a_dump_registers()
544 for (address = 0; address <= 0xff; address++) { in s5k83a_dump_registers()
545 u8 val = 0; in s5k83a_dump_registers()
547 pr_info("register 0x%x contains 0x%x\n", address, val); in s5k83a_dump_registers()
552 for (page = 0; page < 16; page++) { in s5k83a_dump_registers()
554 pr_info("Probing for which registers that are read/write for page 0x%x\n", in s5k83a_dump_registers()
556 for (address = 0; address <= 0xff; address++) { in s5k83a_dump_registers()
557 u8 old_val, ctrl_val, test_val = 0xff; in s5k83a_dump_registers()
564 pr_info("register 0x%x is writeable\n", in s5k83a_dump_registers()
567 pr_info("register 0x%x is read only\n", in s5k83a_dump_registers()