Lines Matching +full:0 +full:x42d
24 #define RJ54N1_DEV_CODE 0x0400
25 #define RJ54N1_DEV_CODE2 0x0401
26 #define RJ54N1_OUT_SEL 0x0403
27 #define RJ54N1_XY_OUTPUT_SIZE_S_H 0x0404
28 #define RJ54N1_X_OUTPUT_SIZE_S_L 0x0405
29 #define RJ54N1_Y_OUTPUT_SIZE_S_L 0x0406
30 #define RJ54N1_XY_OUTPUT_SIZE_P_H 0x0407
31 #define RJ54N1_X_OUTPUT_SIZE_P_L 0x0408
32 #define RJ54N1_Y_OUTPUT_SIZE_P_L 0x0409
33 #define RJ54N1_LINE_LENGTH_PCK_S_H 0x040a
34 #define RJ54N1_LINE_LENGTH_PCK_S_L 0x040b
35 #define RJ54N1_LINE_LENGTH_PCK_P_H 0x040c
36 #define RJ54N1_LINE_LENGTH_PCK_P_L 0x040d
37 #define RJ54N1_RESIZE_N 0x040e
38 #define RJ54N1_RESIZE_N_STEP 0x040f
39 #define RJ54N1_RESIZE_STEP 0x0410
40 #define RJ54N1_RESIZE_HOLD_H 0x0411
41 #define RJ54N1_RESIZE_HOLD_L 0x0412
42 #define RJ54N1_H_OBEN_OFS 0x0413
43 #define RJ54N1_V_OBEN_OFS 0x0414
44 #define RJ54N1_RESIZE_CONTROL 0x0415
45 #define RJ54N1_STILL_CONTROL 0x0417
46 #define RJ54N1_INC_USE_SEL_H 0x0425
47 #define RJ54N1_INC_USE_SEL_L 0x0426
48 #define RJ54N1_MIRROR_STILL_MODE 0x0427
49 #define RJ54N1_INIT_START 0x0428
50 #define RJ54N1_SCALE_1_2_LEV 0x0429
51 #define RJ54N1_SCALE_4_LEV 0x042a
52 #define RJ54N1_Y_GAIN 0x04d8
53 #define RJ54N1_APT_GAIN_UP 0x04fa
54 #define RJ54N1_RA_SEL_UL 0x0530
55 #define RJ54N1_BYTE_SWAP 0x0531
56 #define RJ54N1_OUT_SIGPO 0x053b
57 #define RJ54N1_WB_SEL_WEIGHT_I 0x054e
58 #define RJ54N1_BIT8_WB 0x0569
59 #define RJ54N1_HCAPS_WB 0x056a
60 #define RJ54N1_VCAPS_WB 0x056b
61 #define RJ54N1_HCAPE_WB 0x056c
62 #define RJ54N1_VCAPE_WB 0x056d
63 #define RJ54N1_EXPOSURE_CONTROL 0x058c
64 #define RJ54N1_FRAME_LENGTH_S_H 0x0595
65 #define RJ54N1_FRAME_LENGTH_S_L 0x0596
66 #define RJ54N1_FRAME_LENGTH_P_H 0x0597
67 #define RJ54N1_FRAME_LENGTH_P_L 0x0598
68 #define RJ54N1_PEAK_H 0x05b7
69 #define RJ54N1_PEAK_50 0x05b8
70 #define RJ54N1_PEAK_60 0x05b9
71 #define RJ54N1_PEAK_DIFF 0x05ba
72 #define RJ54N1_IOC 0x05ef
73 #define RJ54N1_TG_BYPASS 0x0700
74 #define RJ54N1_PLL_L 0x0701
75 #define RJ54N1_PLL_N 0x0702
76 #define RJ54N1_PLL_EN 0x0704
77 #define RJ54N1_RATIO_TG 0x0706
78 #define RJ54N1_RATIO_T 0x0707
79 #define RJ54N1_RATIO_R 0x0708
80 #define RJ54N1_RAMP_TGCLK_EN 0x0709
81 #define RJ54N1_OCLK_DSP 0x0710
82 #define RJ54N1_RATIO_OP 0x0711
83 #define RJ54N1_RATIO_O 0x0712
84 #define RJ54N1_OCLK_SEL_EN 0x0713
85 #define RJ54N1_CLK_RST 0x0717
86 #define RJ54N1_RESET_STANDBY 0x0718
87 #define RJ54N1_FWFLG 0x07fe
93 #define DSP_RSTX (1 << 0)
102 #define RJ54N1_COLUMN_SKIP 0
103 #define RJ54N1_ROW_SKIP 0
108 #define PLL_N 0x31
110 /* I2C addresses: 0x50, 0x51, 0x60, 0x61 */
124 for (i = 0; i < n; i++) in rj54n1_find_datafmt()
144 u8 ratio_tg; /* can be 0 or an odd number */
175 {0x417, 0},
176 {0x42c, 0},
177 {0x42d, 0xf0},
178 {0x42e, 0},
179 {0x42f, 0x50},
180 {0x430, 0xf5},
181 {0x431, 0x16},
182 {0x432, 0x20},
183 {0x433, 0},
184 {0x434, 0xc8},
185 {0x43c, 8},
186 {0x43e, 0x90},
187 {0x445, 0x83},
188 {0x4ba, 0x58},
189 {0x4bb, 4},
190 {0x4bc, 0x20},
191 {0x4db, 4},
192 {0x4fe, 2},
196 {0x514, 0},
197 {0x516, 0},
198 {0x518, 0},
199 {0x51a, 0},
200 {0x51d, 0xff},
201 {0x56f, 0x28},
202 {0x575, 0x40},
203 {0x5bc, 0x48},
204 {0x5c1, 6},
205 {0x5e5, 0x11},
206 {0x5e6, 0x43},
207 {0x5e7, 0x33},
208 {0x5e8, 0x21},
209 {0x5e9, 0x30},
210 {0x5ea, 0x0},
211 {0x5eb, 0xa5},
212 {0x5ec, 0xff},
213 {0x5fe, 2},
217 {0x70a, 0},
218 {0x714, 0xff},
219 {0x715, 0xff},
220 {0x716, 0x1f},
221 {0x7FE, 2},
225 {0x800, 0x00},
226 {0x801, 0x01},
227 {0x802, 0x61},
228 {0x805, 0x00},
229 {0x806, 0x00},
230 {0x807, 0x00},
231 {0x808, 0x00},
232 {0x809, 0x01},
233 {0x80A, 0x61},
234 {0x80B, 0x00},
235 {0x80C, 0x01},
236 {0x80D, 0x00},
237 {0x80E, 0x00},
238 {0x80F, 0x00},
239 {0x810, 0x00},
240 {0x811, 0x01},
241 {0x812, 0x61},
242 {0x813, 0x00},
243 {0x814, 0x11},
244 {0x815, 0x00},
245 {0x816, 0x41},
246 {0x817, 0x00},
247 {0x818, 0x51},
248 {0x819, 0x01},
249 {0x81A, 0x1F},
250 {0x81B, 0x00},
251 {0x81C, 0x01},
252 {0x81D, 0x00},
253 {0x81E, 0x11},
254 {0x81F, 0x00},
255 {0x820, 0x41},
256 {0x821, 0x00},
257 {0x822, 0x51},
258 {0x823, 0x00},
259 {0x824, 0x00},
260 {0x825, 0x00},
261 {0x826, 0x47},
262 {0x827, 0x01},
263 {0x828, 0x4F},
264 {0x829, 0x00},
265 {0x82A, 0x00},
266 {0x82B, 0x00},
267 {0x82C, 0x30},
268 {0x82D, 0x00},
269 {0x82E, 0x40},
270 {0x82F, 0x00},
271 {0x830, 0xB3},
272 {0x831, 0x00},
273 {0x832, 0xE3},
274 {0x833, 0x00},
275 {0x834, 0x00},
276 {0x835, 0x00},
277 {0x836, 0x00},
278 {0x837, 0x00},
279 {0x838, 0x00},
280 {0x839, 0x01},
281 {0x83A, 0x61},
282 {0x83B, 0x00},
283 {0x83C, 0x01},
284 {0x83D, 0x00},
285 {0x83E, 0x00},
286 {0x83F, 0x00},
287 {0x840, 0x00},
288 {0x841, 0x01},
289 {0x842, 0x61},
290 {0x843, 0x00},
291 {0x844, 0x1D},
292 {0x845, 0x00},
293 {0x846, 0x00},
294 {0x847, 0x00},
295 {0x848, 0x00},
296 {0x849, 0x01},
297 {0x84A, 0x1F},
298 {0x84B, 0x00},
299 {0x84C, 0x05},
300 {0x84D, 0x00},
301 {0x84E, 0x19},
302 {0x84F, 0x01},
303 {0x850, 0x21},
304 {0x851, 0x01},
305 {0x852, 0x5D},
306 {0x853, 0x00},
307 {0x854, 0x00},
308 {0x855, 0x00},
309 {0x856, 0x19},
310 {0x857, 0x01},
311 {0x858, 0x21},
312 {0x859, 0x00},
313 {0x85A, 0x00},
314 {0x85B, 0x00},
315 {0x85C, 0x00},
316 {0x85D, 0x00},
317 {0x85E, 0x00},
318 {0x85F, 0x00},
319 {0x860, 0xB3},
320 {0x861, 0x00},
321 {0x862, 0xE3},
322 {0x863, 0x00},
323 {0x864, 0x00},
324 {0x865, 0x00},
325 {0x866, 0x00},
326 {0x867, 0x00},
327 {0x868, 0x00},
328 {0x869, 0xE2},
329 {0x86A, 0x00},
330 {0x86B, 0x01},
331 {0x86C, 0x06},
332 {0x86D, 0x00},
333 {0x86E, 0x00},
334 {0x86F, 0x00},
335 {0x870, 0x60},
336 {0x871, 0x8C},
337 {0x872, 0x10},
338 {0x873, 0x00},
339 {0x874, 0xE0},
340 {0x875, 0x00},
341 {0x876, 0x27},
342 {0x877, 0x01},
343 {0x878, 0x00},
344 {0x879, 0x00},
345 {0x87A, 0x00},
346 {0x87B, 0x03},
347 {0x87C, 0x00},
348 {0x87D, 0x00},
349 {0x87E, 0x00},
350 {0x87F, 0x00},
351 {0x880, 0x00},
352 {0x881, 0x00},
353 {0x882, 0x00},
354 {0x883, 0x00},
355 {0x884, 0x00},
356 {0x885, 0x00},
357 {0x886, 0xF8},
358 {0x887, 0x00},
359 {0x888, 0x03},
360 {0x889, 0x00},
361 {0x88A, 0x64},
362 {0x88B, 0x00},
363 {0x88C, 0x03},
364 {0x88D, 0x00},
365 {0x88E, 0xB1},
366 {0x88F, 0x00},
367 {0x890, 0x03},
368 {0x891, 0x01},
369 {0x892, 0x1D},
370 {0x893, 0x00},
371 {0x894, 0x03},
372 {0x895, 0x01},
373 {0x896, 0x4B},
374 {0x897, 0x00},
375 {0x898, 0xE5},
376 {0x899, 0x00},
377 {0x89A, 0x01},
378 {0x89B, 0x00},
379 {0x89C, 0x01},
380 {0x89D, 0x04},
381 {0x89E, 0xC8},
382 {0x89F, 0x00},
383 {0x8A0, 0x01},
384 {0x8A1, 0x01},
385 {0x8A2, 0x61},
386 {0x8A3, 0x00},
387 {0x8A4, 0x01},
388 {0x8A5, 0x00},
389 {0x8A6, 0x00},
390 {0x8A7, 0x00},
391 {0x8A8, 0x00},
392 {0x8A9, 0x00},
393 {0x8AA, 0x7F},
394 {0x8AB, 0x03},
395 {0x8AC, 0x00},
396 {0x8AD, 0x00},
397 {0x8AE, 0x00},
398 {0x8AF, 0x00},
399 {0x8B0, 0x00},
400 {0x8B1, 0x00},
401 {0x8B6, 0x00},
402 {0x8B7, 0x01},
403 {0x8B8, 0x00},
404 {0x8B9, 0x00},
405 {0x8BA, 0x02},
406 {0x8BB, 0x00},
407 {0x8BC, 0xFF},
408 {0x8BD, 0x00},
409 {0x8FE, 2},
413 {0x10bf, 0x69}
420 .ratio_r = 4 /* default: 0 */,
422 .ratio_o = 9 /* default: 0 */,
437 dev_dbg(&client->dev, "[0x%x] = 0x%x\n", 0xff, reg >> 8); in reg_read()
438 ret = i2c_smbus_write_byte_data(client, 0xff, reg >> 8); in reg_read()
439 if (ret < 0) in reg_read()
443 return i2c_smbus_read_byte_data(client, reg & 0xff); in reg_read()
454 dev_dbg(&client->dev, "[0x%x] = 0x%x\n", 0xff, reg >> 8); in reg_write()
455 ret = i2c_smbus_write_byte_data(client, 0xff, reg >> 8); in reg_write()
456 if (ret < 0) in reg_write()
460 dev_dbg(&client->dev, "[0x%x] = 0x%x\n", reg & 0xff, data); in reg_write()
461 return i2c_smbus_write_byte_data(client, reg & 0xff, data); in reg_write()
470 if (ret < 0) in reg_set()
480 for (i = 0; i < n; i++) { in reg_write_multiple()
482 if (ret < 0) in reg_write_multiple()
487 return 0; in reg_write_multiple()
498 return 0; in rj54n1_enum_mbus_code()
506 return reg_set(client, RJ54N1_STILL_CONTROL, (!enable) << 7, 0x80); in rj54n1_s_stream()
516 ((width >> 4) & 0x70) | in rj54n1_set_rect()
520 ret = reg_write(client, reg_x, width & 0xff); in rj54n1_set_rect()
522 ret = reg_write(client, reg_y, height & 0xff); in rj54n1_set_rect()
536 ret = reg_write(client, RJ54N1_INIT_START, 0); in rj54n1_commit()
558 v4l_bound_align_image(&input_w, 8, RJ54N1_MAX_WIDTH, 0, in rj54n1_set_selection()
559 &input_h, 8, RJ54N1_MAX_HEIGHT, 0, 0); in rj54n1_set_selection()
568 if (ret < 0) in rj54n1_set_selection()
577 return 0; in rj54n1_set_selection()
596 return 0; in rj54n1_get_selection()
599 return 0; in rj54n1_get_selection()
625 return 0; in rj54n1_get_fmt()
683 if (ret < 0) in rj54n1_sensor_scale()
725 ret = reg_write(client, RJ54N1_RESIZE_HOLD_L, resize & 0xff); in rj54n1_sensor_scale()
729 if (ret < 0) in rj54n1_sensor_scale()
740 * reduce the framerate? Using 0xfffc for INC_USE_SEL doesn't seem to in rj54n1_sensor_scale()
749 inc_sel = 0xc; in rj54n1_sensor_scale()
753 ret = reg_write(client, RJ54N1_INC_USE_SEL_L, inc_sel & 0xfc); in rj54n1_sensor_scale()
763 wb_bit8 = ((wb_left >> 2) & 0x40) | ((wb_top >> 4) & 0x10) | in rj54n1_sensor_scale()
786 ((peak_50 >> 4) & 0xf0) | (peak_60 >> 8)); in rj54n1_sensor_scale()
799 if (ret < 0) in rj54n1_sensor_scale()
806 if (ret < 0) in rj54n1_sensor_scale()
853 ret = reg_write(client, RJ54N1_OCLK_DSP, 0); in rj54n1_set_clock()
918 ret = reg_write(client, RJ54N1_SCALE_4_LEV, 0xf); in rj54n1_reg_init()
927 ret = reg_write(client, RJ54N1_Y_GAIN, 0x84); in rj54n1_reg_init()
934 ret = reg_write(client, RJ54N1_MIRROR_STILL_MODE, 0x27); in rj54n1_reg_init()
941 ret = reg_write(client, RJ54N1_EXPOSURE_CONTROL, 0x80); in rj54n1_reg_init()
945 if (ret >= 0) { in rj54n1_reg_init()
946 rj54n1->auto_wb = ret & 0x80; in rj54n1_reg_init()
965 /* Start register update? Same register as 0x?FE in many bank_* sets */ in rj54n1_reg_init()
1009 &mf->height, 84, RJ54N1_MAX_HEIGHT, align, 0); in rj54n1_set_fmt()
1012 return 0; in rj54n1_set_fmt()
1019 if (ret < 0) in rj54n1_set_fmt()
1024 if (ret < 0) in rj54n1_set_fmt()
1031 ret = reg_write(client, RJ54N1_OUT_SEL, 0); in rj54n1_set_fmt()
1036 ret = reg_write(client, RJ54N1_OUT_SEL, 0); in rj54n1_set_fmt()
1038 ret = reg_set(client, RJ54N1_BYTE_SWAP, 0, 8); in rj54n1_set_fmt()
1041 ret = reg_write(client, RJ54N1_OUT_SEL, 0x11); in rj54n1_set_fmt()
1046 ret = reg_write(client, RJ54N1_OUT_SEL, 0x11); in rj54n1_set_fmt()
1048 ret = reg_set(client, RJ54N1_BYTE_SWAP, 0, 8); in rj54n1_set_fmt()
1055 ret = reg_write(client, RJ54N1_RA_SEL_UL, 0); in rj54n1_set_fmt()
1067 ret = reg_set(client, RJ54N1_BYTE_SWAP, 0, 8); in rj54n1_set_fmt()
1069 ret = reg_write(client, RJ54N1_RA_SEL_UL, 0); in rj54n1_set_fmt()
1074 ret = reg_set(client, RJ54N1_BYTE_SWAP, 0, 8); in rj54n1_set_fmt()
1090 if (ret < 0) in rj54n1_set_fmt()
1105 if (ret < 0) in rj54n1_set_fmt()
1123 return 0; in rj54n1_set_fmt()
1132 if (reg->reg < 0x400 || reg->reg > 0x1fff) in rj54n1_g_register()
1133 /* Registers > 0x0800 are only available from Sharp support */ in rj54n1_g_register()
1139 if (reg->val > 0xff) in rj54n1_g_register()
1142 return 0; in rj54n1_g_register()
1150 if (reg->reg < 0x400 || reg->reg > 0x1fff) in rj54n1_s_register()
1151 /* Registers >= 0x0800 are only available from Sharp support */ in rj54n1_s_register()
1154 if (reg_write(client, reg->reg, reg->val) < 0) in rj54n1_s_register()
1157 return 0; in rj54n1_s_register()
1180 gpiod_set_value(rj54n1->enable_gpio, 0); in rj54n1_s_power()
1182 gpiod_set_value(rj54n1->pwup_gpio, 0); in rj54n1_s_power()
1184 return 0; in rj54n1_s_power()
1197 data = reg_set(client, RJ54N1_MIRROR_STILL_MODE, 0, 1); in rj54n1_s_ctrl()
1200 if (data < 0) in rj54n1_s_ctrl()
1202 return 0; in rj54n1_s_ctrl()
1205 data = reg_set(client, RJ54N1_MIRROR_STILL_MODE, 0, 2); in rj54n1_s_ctrl()
1208 if (data < 0) in rj54n1_s_ctrl()
1210 return 0; in rj54n1_s_ctrl()
1212 if (reg_write(client, RJ54N1_Y_GAIN, ctrl->val * 2) < 0) in rj54n1_s_ctrl()
1214 return 0; in rj54n1_s_ctrl()
1218 0x80) < 0) in rj54n1_s_ctrl()
1221 return 0; in rj54n1_s_ctrl()
1269 if (ret < 0) in rj54n1_video_probe()
1276 if (data1 != 0x51 || data2 != 0x10) { in rj54n1_video_probe()
1278 dev_info(&client->dev, "No RJ54N1CB0C found, read 0x%x:0x%x\n", in rj54n1_video_probe()
1283 /* Configure IOCTL polarity from the platform data: 0 or 1 << 7. */ in rj54n1_video_probe()
1285 if (ret < 0) in rj54n1_video_probe()
1288 dev_info(&client->dev, "Detected a RJ54N1CB0C chip ID 0x%x:0x%x\n", in rj54n1_video_probe()
1294 rj54n1_s_power(&rj54n1->subdev, 0); in rj54n1_video_probe()
1325 V4L2_CID_VFLIP, 0, 1, 1, 0); in rj54n1_probe()
1327 V4L2_CID_HFLIP, 0, 1, 1, 0); in rj54n1_probe()
1329 V4L2_CID_GAIN, 0, 127, 1, 66); in rj54n1_probe()
1331 V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 1); in rj54n1_probe()
1343 rj54n1->fmt = &rj54n1_colour_fmts[0]; in rj54n1_probe()
1373 if (ret < 0) in rj54n1_probe()
1380 return 0; in rj54n1_probe()