From 5ef54b5955acdcc63ac8ad7cf0aef3d16070773a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 31 Jan 2014 10:57:27 -0300 Subject: [media] adv7604: Specify the default input through platform data And set input routing when initializing the device. Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/adv7604.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/media/i2c') diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index b14dc7d4b7b..342d73d3989 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -2441,6 +2441,13 @@ static int adv7604_core_init(struct v4l2_subdev *sd) disable_input(sd); + if (pdata->default_input >= 0 && + pdata->default_input < state->source_pad) { + state->selected_input = pdata->default_input; + select_input(sd); + enable_input(sd); + } + /* power */ io_write(sd, 0x0c, 0x42); /* Power up part and power down VDP */ io_write(sd, 0x0b, 0x44); /* Power down ESDP block */ -- cgit v1.2.3-70-g09d2