Skip to content

Commit

Permalink
[media] adv7604: Specify the default input through platform data
Browse files Browse the repository at this point in the history
And set input routing when initializing the device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 25, 2014
1 parent e9d50e9 commit 5ef54b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/media/i2c/adv7604.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 2 additions & 0 deletions include/media/adv7604.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ struct adv7604_platform_data {
/* DIS_CABLE_DET_RST: 1 if the 5V pins are unused and unconnected */
unsigned disable_cable_det_rst:1;

int default_input;

/* Analog input muxing mode */
enum adv7604_ain_sel ain_sel;

Expand Down

0 comments on commit 5ef54b5

Please sign in to comment.