diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-13 17:29:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-13 17:29:07 -0400 |
commit | f499cae1e59d75d5eb24c23d47cf8986e6032c6d (patch) | |
tree | 1af6235c18391212c40116eb90b01eae8938efee /drivers/media/video/vpx3220.c | |
parent | fc3f55e672e1ed917dd9e215af81939cd3d717da (diff) | |
parent | 80a04d3f2f94fb68b5df05e3ac6697130bc3467a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/media/video/vpx3220.c')
-rw-r--r-- | drivers/media/video/vpx3220.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 2fa7e8bb5746..97e0ce28ff18 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c | |||
@@ -376,33 +376,34 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std) | |||
376 | return 0; | 376 | return 0; |
377 | } | 377 | } |
378 | 378 | ||
379 | static int vpx3220_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) | 379 | static int vpx3220_s_routing(struct v4l2_subdev *sd, |
380 | u32 input, u32 output, u32 config) | ||
380 | { | 381 | { |
381 | int data; | 382 | int data; |
382 | 383 | ||
383 | /* RJ: route->input = 0: ST8 (PCTV) input | 384 | /* RJ: input = 0: ST8 (PCTV) input |
384 | route->input = 1: COMPOSITE input | 385 | input = 1: COMPOSITE input |
385 | route->input = 2: SVHS input */ | 386 | input = 2: SVHS input */ |
386 | 387 | ||
387 | const int input[3][2] = { | 388 | const int input_vals[3][2] = { |
388 | {0x0c, 0}, | 389 | {0x0c, 0}, |
389 | {0x0d, 0}, | 390 | {0x0d, 0}, |
390 | {0x0e, 1} | 391 | {0x0e, 1} |
391 | }; | 392 | }; |
392 | 393 | ||
393 | if (route->input < 0 || route->input > 2) | 394 | if (input < 0 || input > 2) |
394 | return -EINVAL; | 395 | return -EINVAL; |
395 | 396 | ||
396 | v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[route->input]); | 397 | v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[input]); |
397 | 398 | ||
398 | vpx3220_write(sd, 0x33, input[route->input][0]); | 399 | vpx3220_write(sd, 0x33, input_vals[input][0]); |
399 | 400 | ||
400 | data = vpx3220_fp_read(sd, 0xf2) & ~(0x0020); | 401 | data = vpx3220_fp_read(sd, 0xf2) & ~(0x0020); |
401 | if (data < 0) | 402 | if (data < 0) |
402 | return data; | 403 | return data; |
403 | /* 0x0010 is required to latch the setting */ | 404 | /* 0x0010 is required to latch the setting */ |
404 | vpx3220_fp_write(sd, 0xf2, | 405 | vpx3220_fp_write(sd, 0xf2, |
405 | data | (input[route->input][1] << 5) | 0x0010); | 406 | data | (input_vals[input][1] << 5) | 0x0010); |
406 | 407 | ||
407 | udelay(10); | 408 | udelay(10); |
408 | return 0; | 409 | return 0; |
@@ -516,9 +517,6 @@ static const struct v4l2_subdev_core_ops vpx3220_core_ops = { | |||
516 | .g_ctrl = vpx3220_g_ctrl, | 517 | .g_ctrl = vpx3220_g_ctrl, |
517 | .s_ctrl = vpx3220_s_ctrl, | 518 | .s_ctrl = vpx3220_s_ctrl, |
518 | .queryctrl = vpx3220_queryctrl, | 519 | .queryctrl = vpx3220_queryctrl, |
519 | }; | ||
520 | |||
521 | static const struct v4l2_subdev_tuner_ops vpx3220_tuner_ops = { | ||
522 | .s_std = vpx3220_s_std, | 520 | .s_std = vpx3220_s_std, |
523 | }; | 521 | }; |
524 | 522 | ||
@@ -531,7 +529,6 @@ static const struct v4l2_subdev_video_ops vpx3220_video_ops = { | |||
531 | 529 | ||
532 | static const struct v4l2_subdev_ops vpx3220_ops = { | 530 | static const struct v4l2_subdev_ops vpx3220_ops = { |
533 | .core = &vpx3220_core_ops, | 531 | .core = &vpx3220_core_ops, |
534 | .tuner = &vpx3220_tuner_ops, | ||
535 | .video = &vpx3220_video_ops, | 532 | .video = &vpx3220_video_ops, |
536 | }; | 533 | }; |
537 | 534 | ||