aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-01-31 08:57:27 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 12:03:02 -0400
commit5ef54b5955acdcc63ac8ad7cf0aef3d16070773a (patch)
tree5e3ca1717c4ebffe2c28f71f8670ba76306c3c0f
parente9d50e9e7051a67783d75cd57ce360818b07d37b (diff)
[media] adv7604: Specify the default input through platform data
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>
-rw-r--r--drivers/media/i2c/adv7604.c7
-rw-r--r--include/media/adv7604.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index b14dc7d4b7bb..342d73d3989b 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)
2441 2441
2442 disable_input(sd); 2442 disable_input(sd);
2443 2443
2444 if (pdata->default_input >= 0 &&
2445 pdata->default_input < state->source_pad) {
2446 state->selected_input = pdata->default_input;
2447 select_input(sd);
2448 enable_input(sd);
2449 }
2450
2444 /* power */ 2451 /* power */
2445 io_write(sd, 0x0c, 0x42); /* Power up part and power down VDP */ 2452 io_write(sd, 0x0c, 0x42); /* Power up part and power down VDP */
2446 io_write(sd, 0x0b, 0x44); /* Power down ESDP block */ 2453 io_write(sd, 0x0b, 0x44); /* Power down ESDP block */
diff --git a/include/media/adv7604.h b/include/media/adv7604.h
index 276135b7faa3..40b4ae04ff8e 100644
--- a/include/media/adv7604.h
+++ b/include/media/adv7604.h
@@ -104,6 +104,8 @@ struct adv7604_platform_data {
104 /* DIS_CABLE_DET_RST: 1 if the 5V pins are unused and unconnected */ 104 /* DIS_CABLE_DET_RST: 1 if the 5V pins are unused and unconnected */
105 unsigned disable_cable_det_rst:1; 105 unsigned disable_cable_det_rst:1;
106 106
107 int default_input;
108
107 /* Analog input muxing mode */ 109 /* Analog input muxing mode */
108 enum adv7604_ain_sel ain_sel; 110 enum adv7604_ain_sel ain_sel;
109 111