Lines Matching +full:0 +full:xffffff7f
24 u32 value = 0; in medusa_enable_bluefield_output()
25 u32 tmp = 0; in medusa_enable_bluefield_output()
63 value = cx25821_i2c_read(&dev->i2c_bus[0], out_ctrl, &tmp); in medusa_enable_bluefield_output()
64 value &= 0xFFFFFF7F; /* clear BLUE_FIELD_EN */ in medusa_enable_bluefield_output()
66 value |= 0x00000080; /* set BLUE_FIELD_EN */ in medusa_enable_bluefield_output()
67 cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl, value); in medusa_enable_bluefield_output()
69 value = cx25821_i2c_read(&dev->i2c_bus[0], out_ctrl_ns, &tmp); in medusa_enable_bluefield_output()
70 value &= 0xFFFFFF7F; in medusa_enable_bluefield_output()
72 value |= 0x00000080; /* set BLUE_FIELD_EN */ in medusa_enable_bluefield_output()
73 cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl_ns, value); in medusa_enable_bluefield_output()
78 int ret_val = 0; in medusa_initialize_ntsc()
79 int i = 0; in medusa_initialize_ntsc()
80 u32 value = 0; in medusa_initialize_ntsc()
81 u32 tmp = 0; in medusa_initialize_ntsc()
83 for (i = 0; i < MAX_DECODERS; i++) { in medusa_initialize_ntsc()
85 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
86 MODE_CTRL + (0x200 * i), &tmp); in medusa_initialize_ntsc()
87 value &= 0xFFFFFFF0; in medusa_initialize_ntsc()
89 value |= 0x10001; in medusa_initialize_ntsc()
90 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
91 MODE_CTRL + (0x200 * i), value); in medusa_initialize_ntsc()
94 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
95 HORIZ_TIM_CTRL + (0x200 * i), &tmp); in medusa_initialize_ntsc()
96 value &= 0x00C00C00; in medusa_initialize_ntsc()
97 value |= 0x612D0074; in medusa_initialize_ntsc()
98 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
99 HORIZ_TIM_CTRL + (0x200 * i), value); in medusa_initialize_ntsc()
101 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
102 VERT_TIM_CTRL + (0x200 * i), &tmp); in medusa_initialize_ntsc()
103 value &= 0x00C00C00; in medusa_initialize_ntsc()
104 value |= 0x1C1E001A; /* vblank_cnt + 2 to get camera ID */ in medusa_initialize_ntsc()
105 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
106 VERT_TIM_CTRL + (0x200 * i), value); in medusa_initialize_ntsc()
109 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
110 SC_STEP_SIZE + (0x200 * i), 0x43E00000); in medusa_initialize_ntsc()
113 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
114 OUT_CTRL_NS + (0x200 * i), &tmp); in medusa_initialize_ntsc()
115 value &= 0xFFFBFFFF; in medusa_initialize_ntsc()
116 value |= 0x00040000; in medusa_initialize_ntsc()
117 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
118 OUT_CTRL_NS + (0x200 * i), value); in medusa_initialize_ntsc()
121 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
122 OUT_CTRL1 + (0x200 * i), &tmp); in medusa_initialize_ntsc()
123 value &= 0xFFFBFFFF; in medusa_initialize_ntsc()
124 value |= 0x00040000; in medusa_initialize_ntsc()
125 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
126 OUT_CTRL1 + (0x200 * i), value); in medusa_initialize_ntsc()
132 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
133 MISC_TIM_CTRL + (0x200 * i), &tmp); in medusa_initialize_ntsc()
137 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
138 MISC_TIM_CTRL + (0x200 * i), value); in medusa_initialize_ntsc()
140 /* set vbi_gate_en to 0 */ in medusa_initialize_ntsc()
141 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
142 DFE_CTRL1 + (0x200 * i), &tmp); in medusa_initialize_ntsc()
144 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
145 DFE_CTRL1 + (0x200 * i), value); in medusa_initialize_ntsc()
151 for (i = 0; i < MAX_ENCODERS; i++) { in medusa_initialize_ntsc()
153 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
154 DENC_A_REG_1 + (0x100 * i), &tmp); in medusa_initialize_ntsc()
155 value &= 0xF000FC00; in medusa_initialize_ntsc()
156 value |= 0x06B402D0; in medusa_initialize_ntsc()
157 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
158 DENC_A_REG_1 + (0x100 * i), value); in medusa_initialize_ntsc()
161 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
162 DENC_A_REG_2 + (0x100 * i), &tmp); in medusa_initialize_ntsc()
163 value &= 0xFF000000; in medusa_initialize_ntsc()
164 value |= 0x007E9054; in medusa_initialize_ntsc()
165 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
166 DENC_A_REG_2 + (0x100 * i), value); in medusa_initialize_ntsc()
168 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
169 DENC_A_REG_3 + (0x100 * i), &tmp); in medusa_initialize_ntsc()
170 value &= 0xFC00FE00; in medusa_initialize_ntsc()
171 value |= 0x00EC00F0; in medusa_initialize_ntsc()
172 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
173 DENC_A_REG_3 + (0x100 * i), value); in medusa_initialize_ntsc()
176 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
177 DENC_A_REG_4 + (0x100 * i), &tmp); in medusa_initialize_ntsc()
178 value &= 0x00FCFFFF; in medusa_initialize_ntsc()
179 value |= 0x13020000; in medusa_initialize_ntsc()
180 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
181 DENC_A_REG_4 + (0x100 * i), value); in medusa_initialize_ntsc()
183 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_ntsc()
184 DENC_A_REG_5 + (0x100 * i), &tmp); in medusa_initialize_ntsc()
185 value &= 0xFFFF0000; in medusa_initialize_ntsc()
186 value |= 0x0000E575; in medusa_initialize_ntsc()
187 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
188 DENC_A_REG_5 + (0x100 * i), value); in medusa_initialize_ntsc()
190 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
191 DENC_A_REG_6 + (0x100 * i), 0x009A89C1); in medusa_initialize_ntsc()
194 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_ntsc()
195 DENC_A_REG_7 + (0x100 * i), 0x21F07C1F); in medusa_initialize_ntsc()
199 /* 0 - 720 */ in medusa_initialize_ntsc()
200 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], HSCALE_CTRL, 0x0); in medusa_initialize_ntsc()
201 /* 0 - 480 */ in medusa_initialize_ntsc()
202 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], VSCALE_CTRL, 0x0); in medusa_initialize_ntsc()
205 value = cx25821_i2c_read(&dev->i2c_bus[0], BYP_AB_CTRL, &tmp); in medusa_initialize_ntsc()
206 value |= 0x00080200; in medusa_initialize_ntsc()
207 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], BYP_AB_CTRL, value); in medusa_initialize_ntsc()
215 u32 value = 0, tmp = 0; in medusa_PALCombInit()
218 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_PALCombInit()
219 COMB_2D_HFS_CFG + (0x200 * dec), 0x20002861); in medusa_PALCombInit()
220 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_PALCombInit()
221 COMB_2D_HFD_CFG + (0x200 * dec), 0x20002861); in medusa_PALCombInit()
222 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_PALCombInit()
223 COMB_2D_LF_CFG + (0x200 * dec), 0x200A1023); in medusa_PALCombInit()
226 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_PALCombInit()
227 COMB_FLAT_THRESH_CTRL + (0x200 * dec), &tmp); in medusa_PALCombInit()
228 value &= 0x06230000; in medusa_PALCombInit()
229 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_PALCombInit()
230 COMB_FLAT_THRESH_CTRL + (0x200 * dec), value); in medusa_PALCombInit()
233 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_PALCombInit()
234 COMB_2D_BLEND + (0x200 * dec), 0x210F0F0F); in medusa_PALCombInit()
237 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_PALCombInit()
238 COMB_MISC_CTRL + (0x200 * dec), 0x41120A7F); in medusa_PALCombInit()
245 int ret_val = 0; in medusa_initialize_pal()
246 int i = 0; in medusa_initialize_pal()
247 u32 value = 0; in medusa_initialize_pal()
248 u32 tmp = 0; in medusa_initialize_pal()
250 for (i = 0; i < MAX_DECODERS; i++) { in medusa_initialize_pal()
252 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
253 MODE_CTRL + (0x200 * i), &tmp); in medusa_initialize_pal()
254 value &= 0xFFFFFFF0; in medusa_initialize_pal()
256 value |= 0x10004; in medusa_initialize_pal()
257 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
258 MODE_CTRL + (0x200 * i), value); in medusa_initialize_pal()
261 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
262 HORIZ_TIM_CTRL + (0x200 * i), &tmp); in medusa_initialize_pal()
263 value &= 0x00C00C00; in medusa_initialize_pal()
264 value |= 0x632D007D; in medusa_initialize_pal()
265 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
266 HORIZ_TIM_CTRL + (0x200 * i), value); in medusa_initialize_pal()
269 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
270 VERT_TIM_CTRL + (0x200 * i), &tmp); in medusa_initialize_pal()
271 value &= 0x00C00C00; in medusa_initialize_pal()
272 value |= 0x28240026; /* vblank_cnt + 2 to get camera ID */ in medusa_initialize_pal()
273 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
274 VERT_TIM_CTRL + (0x200 * i), value); in medusa_initialize_pal()
277 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
278 SC_STEP_SIZE + (0x200 * i), 0x5411E2D0); in medusa_initialize_pal()
281 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
282 OUT_CTRL_NS + (0x200 * i), &tmp); in medusa_initialize_pal()
283 value &= 0xFFFBFFFF; in medusa_initialize_pal()
284 value |= 0x00040000; in medusa_initialize_pal()
285 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
286 OUT_CTRL_NS + (0x200 * i), value); in medusa_initialize_pal()
289 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
290 OUT_CTRL1 + (0x200 * i), &tmp); in medusa_initialize_pal()
291 value &= 0xFFFBFFFF; in medusa_initialize_pal()
292 value |= 0x00040000; in medusa_initialize_pal()
293 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
294 OUT_CTRL1 + (0x200 * i), value); in medusa_initialize_pal()
300 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
301 MISC_TIM_CTRL + (0x200 * i), &tmp); in medusa_initialize_pal()
305 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
306 MISC_TIM_CTRL + (0x200 * i), value); in medusa_initialize_pal()
308 /* set vbi_gate_en to 0 */ in medusa_initialize_pal()
309 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
310 DFE_CTRL1 + (0x200 * i), &tmp); in medusa_initialize_pal()
312 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
313 DFE_CTRL1 + (0x200 * i), value); in medusa_initialize_pal()
321 for (i = 0; i < MAX_ENCODERS; i++) { in medusa_initialize_pal()
323 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
324 DENC_A_REG_1 + (0x100 * i), &tmp); in medusa_initialize_pal()
325 value &= 0xF000FC00; in medusa_initialize_pal()
326 value |= 0x06C002D0; in medusa_initialize_pal()
327 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
328 DENC_A_REG_1 + (0x100 * i), value); in medusa_initialize_pal()
331 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
332 DENC_A_REG_2 + (0x100 * i), &tmp); in medusa_initialize_pal()
333 value &= 0xFF000000; in medusa_initialize_pal()
334 value |= 0x007E9754; in medusa_initialize_pal()
335 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
336 DENC_A_REG_2 + (0x100 * i), value); in medusa_initialize_pal()
339 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
340 DENC_A_REG_3 + (0x100 * i), &tmp); in medusa_initialize_pal()
341 value &= 0xFC00FE00; in medusa_initialize_pal()
342 value |= 0x00FC0120; in medusa_initialize_pal()
343 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
344 DENC_A_REG_3 + (0x100 * i), value); in medusa_initialize_pal()
346 /* set PAL vblank, phase alternation, 0 IRE pedestal */ in medusa_initialize_pal()
347 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
348 DENC_A_REG_4 + (0x100 * i), &tmp); in medusa_initialize_pal()
349 value &= 0x00FCFFFF; in medusa_initialize_pal()
350 value |= 0x14010000; in medusa_initialize_pal()
351 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
352 DENC_A_REG_4 + (0x100 * i), value); in medusa_initialize_pal()
354 value = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_initialize_pal()
355 DENC_A_REG_5 + (0x100 * i), &tmp); in medusa_initialize_pal()
356 value &= 0xFFFF0000; in medusa_initialize_pal()
357 value |= 0x0000F078; in medusa_initialize_pal()
358 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
359 DENC_A_REG_5 + (0x100 * i), value); in medusa_initialize_pal()
361 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
362 DENC_A_REG_6 + (0x100 * i), 0x00A493CF); in medusa_initialize_pal()
365 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], in medusa_initialize_pal()
366 DENC_A_REG_7 + (0x100 * i), 0x2A098ACB); in medusa_initialize_pal()
370 /* 0 - 720 */ in medusa_initialize_pal()
371 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], HSCALE_CTRL, 0x0); in medusa_initialize_pal()
372 /* 0 - 576 */ in medusa_initialize_pal()
373 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], VSCALE_CTRL, 0x0); in medusa_initialize_pal()
376 value = cx25821_i2c_read(&dev->i2c_bus[0], BYP_AB_CTRL, &tmp); in medusa_initialize_pal()
377 value &= 0xFFF7FDFF; in medusa_initialize_pal()
378 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], BYP_AB_CTRL, value); in medusa_initialize_pal()
385 int status = 0; in medusa_set_videostandard()
386 u32 value = 0, tmp = 0; in medusa_set_videostandard()
394 value = cx25821_i2c_read(&dev->i2c_bus[0], DENC_A_REG_4, &tmp); in medusa_set_videostandard()
396 status = cx25821_i2c_write(&dev->i2c_bus[0], DENC_A_REG_4, value); in medusa_set_videostandard()
399 value = cx25821_i2c_read(&dev->i2c_bus[0], DENC_B_REG_4, &tmp); in medusa_set_videostandard()
401 status = cx25821_i2c_write(&dev->i2c_bus[0], DENC_B_REG_4, value); in medusa_set_videostandard()
409 int decoder = 0; in medusa_set_resolution()
410 int decoder_count = 0; in medusa_set_resolution()
411 u32 hscale = 0x0; in medusa_set_resolution()
412 u32 vscale = 0x0; in medusa_set_resolution()
422 if (decoder_select <= 7 && decoder_select >= 0) { in medusa_set_resolution()
426 decoder = 0; in medusa_set_resolution()
432 hscale = 0x13E34B; in medusa_set_resolution()
433 vscale = 0x0; in medusa_set_resolution()
437 hscale = 0x10A273; in medusa_set_resolution()
438 vscale = 0x0; in medusa_set_resolution()
442 hscale = 0x3115B2; in medusa_set_resolution()
443 vscale = 0x1E00; in medusa_set_resolution()
447 hscale = 0x378D84; in medusa_set_resolution()
448 vscale = 0x1E00; in medusa_set_resolution()
452 hscale = 0x0; in medusa_set_resolution()
453 vscale = 0x0; in medusa_set_resolution()
459 cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_resolution()
460 HSCALE_CTRL + (0x200 * decoder), hscale); in medusa_set_resolution()
461 cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_resolution()
462 VSCALE_CTRL + (0x200 * decoder), vscale); in medusa_set_resolution()
469 u32 fld_cnt = 0; in medusa_set_decoderduration()
470 u32 tmp = 0; in medusa_set_decoderduration()
496 fld_cnt = cx25821_i2c_read(&dev->i2c_bus[0], disp_cnt_reg, &tmp); in medusa_set_decoderduration()
499 fld_cnt &= 0xFFFF0000; in medusa_set_decoderduration()
502 fld_cnt &= 0x0000FFFF; in medusa_set_decoderduration()
506 cx25821_i2c_write(&dev->i2c_bus[0], disp_cnt_reg, fld_cnt); in medusa_set_decoderduration()
535 return 0; in mapM()
542 if (numeric >= 0) in convert_to_twos()
545 temp = ~(abs(numeric) & 0xFF); in convert_to_twos()
553 int ret_val = 0; in medusa_set_brightness()
554 int value = 0; in medusa_set_brightness()
555 u32 val = 0, tmp = 0; in medusa_set_brightness()
564 val = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_set_brightness()
565 VDEC_A_BRITE_CTRL + (0x200 * decoder), &tmp); in medusa_set_brightness()
566 val &= 0xFFFFFF00; in medusa_set_brightness()
567 ret_val |= cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_brightness()
568 VDEC_A_BRITE_CTRL + (0x200 * decoder), val | value); in medusa_set_brightness()
574 int ret_val = 0; in medusa_set_contrast()
575 int value = 0; in medusa_set_contrast()
576 u32 val = 0, tmp = 0; in medusa_set_contrast()
584 val = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_set_contrast()
585 VDEC_A_CNTRST_CTRL + (0x200 * decoder), &tmp); in medusa_set_contrast()
586 val &= 0xFFFFFF00; in medusa_set_contrast()
587 ret_val |= cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_contrast()
588 VDEC_A_CNTRST_CTRL + (0x200 * decoder), val | value); in medusa_set_contrast()
595 int ret_val = 0; in medusa_set_hue()
596 int value = 0; in medusa_set_hue()
597 u32 val = 0, tmp = 0; in medusa_set_hue()
607 val = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_set_hue()
608 VDEC_A_HUE_CTRL + (0x200 * decoder), &tmp); in medusa_set_hue()
609 val &= 0xFFFFFF00; in medusa_set_hue()
611 ret_val |= cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_hue()
612 VDEC_A_HUE_CTRL + (0x200 * decoder), val | value); in medusa_set_hue()
619 int ret_val = 0; in medusa_set_saturation()
620 int value = 0; in medusa_set_saturation()
621 u32 val = 0, tmp = 0; in medusa_set_saturation()
631 val = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_set_saturation()
632 VDEC_A_USAT_CTRL + (0x200 * decoder), &tmp); in medusa_set_saturation()
633 val &= 0xFFFFFF00; in medusa_set_saturation()
634 ret_val |= cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_saturation()
635 VDEC_A_USAT_CTRL + (0x200 * decoder), val | value); in medusa_set_saturation()
637 val = cx25821_i2c_read(&dev->i2c_bus[0], in medusa_set_saturation()
638 VDEC_A_VSAT_CTRL + (0x200 * decoder), &tmp); in medusa_set_saturation()
639 val &= 0xFFFFFF00; in medusa_set_saturation()
640 ret_val |= cx25821_i2c_write(&dev->i2c_bus[0], in medusa_set_saturation()
641 VDEC_A_VSAT_CTRL + (0x200 * decoder), val | value); in medusa_set_saturation()
650 u32 value = 0, tmp = 0; in medusa_video_init()
651 int ret_val = 0; in medusa_video_init()
652 int i = 0; in medusa_video_init()
655 value = cx25821_i2c_read(&dev->i2c_bus[0], MON_A_CTRL, &tmp); in medusa_video_init()
656 value &= 0xFFFFF0FF; in medusa_video_init()
657 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value); in medusa_video_init()
659 if (ret_val < 0) in medusa_video_init()
663 value = cx25821_i2c_read(&dev->i2c_bus[0], MON_A_CTRL, &tmp); in medusa_video_init()
664 value &= 0xFFFFFFDF; in medusa_video_init()
665 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value); in medusa_video_init()
667 if (ret_val < 0) in medusa_video_init()
671 * FIXME: due to a coding bug the duration was always 0. It's in medusa_video_init()
674 * now just fill in 0 as the duration. in medusa_video_init()
676 for (i = 0; i < dev->_max_num_decoders; i++) in medusa_video_init()
677 medusa_set_decoderduration(dev, i, 0); in medusa_video_init()
680 value = cx25821_i2c_read(&dev->i2c_bus[0], DENC_AB_CTRL, &tmp); in medusa_video_init()
681 value &= 0xFF70FF70; in medusa_video_init()
682 value |= 0x00090008; /* set en_active */ in medusa_video_init()
683 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], DENC_AB_CTRL, value); in medusa_video_init()
685 if (ret_val < 0) in medusa_video_init()
689 value = cx25821_i2c_read(&dev->i2c_bus[0], BYP_AB_CTRL, &tmp); in medusa_video_init()
690 value |= 0x00040100; /* enable VIP */ in medusa_video_init()
691 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], BYP_AB_CTRL, value); in medusa_video_init()
693 if (ret_val < 0) in medusa_video_init()
697 value = cx25821_i2c_read(&dev->i2c_bus[0], AFE_AB_DIAG_CTRL, &tmp); in medusa_video_init()
698 value &= 0x83FFFFFF; in medusa_video_init()
699 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], AFE_AB_DIAG_CTRL, in medusa_video_init()
700 value | 0x10000000); in medusa_video_init()
702 if (ret_val < 0) in medusa_video_init()
706 value = cx25821_i2c_read(&dev->i2c_bus[0], PIN_OE_CTRL, &tmp); in medusa_video_init()
707 value &= 0xFEF0FE00; in medusa_video_init()
715 value |= 0x010001F8; in medusa_video_init()
718 value |= 0x010F0108; in medusa_video_init()
722 ret_val = cx25821_i2c_write(&dev->i2c_bus[0], PIN_OE_CTRL, value); in medusa_video_init()
724 if (ret_val < 0) in medusa_video_init()