diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2009-12-11 09:53:54 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-16 06:27:36 -0500 |
commit | 398994c1e104324acc836894290f2453d7f75ff5 (patch) | |
tree | 5c8f2e7f117e8005c502ca357c764bed2823a475 /drivers/media/video/tw9910.c | |
parent | 85dc1cff0df3a7e3012cf88b94026f954a72c178 (diff) |
V4L/DVB (13666): tw9910: modify V/H outpit pin setting to use VALID
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tw9910.c')
-rw-r--r-- | drivers/media/video/tw9910.c | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 5e7672abe815..1fdc758041d5 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -239,18 +239,6 @@ struct tw9910_priv { | |||
239 | u32 revision; | 239 | u32 revision; |
240 | }; | 240 | }; |
241 | 241 | ||
242 | /* | ||
243 | * register settings | ||
244 | */ | ||
245 | |||
246 | #define ENDMARKER { 0xff, 0xff } | ||
247 | |||
248 | static const struct regval_list tw9910_default_regs[] = | ||
249 | { | ||
250 | { OUTCTR1, VSP_LO | VSSL_VVALID | HSP_HI | HSSL_HSYNC }, | ||
251 | ENDMARKER, | ||
252 | }; | ||
253 | |||
254 | static const struct tw9910_scale_ctrl tw9910_ntsc_scales[] = { | 242 | static const struct tw9910_scale_ctrl tw9910_ntsc_scales[] = { |
255 | { | 243 | { |
256 | .name = "NTSC SQ", | 244 | .name = "NTSC SQ", |
@@ -459,20 +447,6 @@ static int tw9910_set_hsync(struct i2c_client *client, | |||
459 | return ret; | 447 | return ret; |
460 | } | 448 | } |
461 | 449 | ||
462 | static int tw9910_write_array(struct i2c_client *client, | ||
463 | const struct regval_list *vals) | ||
464 | { | ||
465 | while (vals->reg_num != 0xff) { | ||
466 | int ret = i2c_smbus_write_byte_data(client, | ||
467 | vals->reg_num, | ||
468 | vals->value); | ||
469 | if (ret < 0) | ||
470 | return ret; | ||
471 | vals++; | ||
472 | } | ||
473 | return 0; | ||
474 | } | ||
475 | |||
476 | static void tw9910_reset(struct i2c_client *client) | 450 | static void tw9910_reset(struct i2c_client *client) |
477 | { | 451 | { |
478 | tw9910_mask_set(client, ACNTL1, SRESET, SRESET); | 452 | tw9910_mask_set(client, ACNTL1, SRESET, SRESET); |
@@ -577,7 +551,14 @@ static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) | |||
577 | static int tw9910_set_bus_param(struct soc_camera_device *icd, | 551 | static int tw9910_set_bus_param(struct soc_camera_device *icd, |
578 | unsigned long flags) | 552 | unsigned long flags) |
579 | { | 553 | { |
580 | return 0; | 554 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
555 | struct i2c_client *client = sd->priv; | ||
556 | |||
557 | /* | ||
558 | * set OUTCTR1 | ||
559 | */ | ||
560 | return i2c_smbus_write_byte_data(client, OUTCTR1, | ||
561 | VSSL_VVALID | HSSL_DVALID); | ||
581 | } | 562 | } |
582 | 563 | ||
583 | static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd) | 564 | static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd) |
@@ -680,9 +661,6 @@ static int tw9910_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
680 | * reset hardware | 661 | * reset hardware |
681 | */ | 662 | */ |
682 | tw9910_reset(client); | 663 | tw9910_reset(client); |
683 | ret = tw9910_write_array(client, tw9910_default_regs); | ||
684 | if (ret < 0) | ||
685 | goto tw9910_set_fmt_error; | ||
686 | 664 | ||
687 | /* | 665 | /* |
688 | * set bus width | 666 | * set bus width |