diff options
author | Lad, Prabhakar <prabhakar.lad@ti.com> | 2012-09-25 07:11:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 21:12:27 -0400 |
commit | 2bd4e58c9d00325b7a850b2ac73fd902e9148b77 (patch) | |
tree | ef3242b551f05c3a54533e4a21ff21acd9a3b137 /arch/arm/mach-davinci/board-da850-evm.c | |
parent | c389648a927bada928c854dccccf0301317784eb (diff) |
[media] media: davinci: vpif: display: separate out subdev from output
vpif_display relied on a 1-1 mapping of output and subdev. This is not
necessarily the case. Separate the two. So there is a list of subdevs
and a list of outputs. Each output refers to a subdev and has routing
information. An output does not have to have a subdev.
The initial output for each channel is set to the fist output.
Currently missing is support for associating multiple subdevs with
an output.
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-da850-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 8663df3d2a58..bc6b8c7b86c3 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <mach/spi.h> | 46 | #include <mach/spi.h> |
47 | 47 | ||
48 | #include <media/tvp514x.h> | 48 | #include <media/tvp514x.h> |
49 | #include <media/adv7343.h> | ||
49 | 50 | ||
50 | #define DA850_EVM_PHY_ID "davinci_mdio-0:00" | 51 | #define DA850_EVM_PHY_ID "davinci_mdio-0:00" |
51 | #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) | 52 | #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) |
@@ -1259,16 +1260,38 @@ static struct vpif_subdev_info da850_vpif_subdev[] = { | |||
1259 | }, | 1260 | }, |
1260 | }; | 1261 | }; |
1261 | 1262 | ||
1262 | static const char const *vpif_output[] = { | 1263 | static const struct vpif_output da850_ch0_outputs[] = { |
1263 | "Composite", | 1264 | { |
1264 | "S-Video", | 1265 | .output = { |
1266 | .index = 0, | ||
1267 | .name = "Composite", | ||
1268 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
1269 | .capabilities = V4L2_OUT_CAP_STD, | ||
1270 | .std = V4L2_STD_ALL, | ||
1271 | }, | ||
1272 | .subdev_name = "adv7343", | ||
1273 | .output_route = ADV7343_COMPOSITE_ID, | ||
1274 | }, | ||
1275 | { | ||
1276 | .output = { | ||
1277 | .index = 1, | ||
1278 | .name = "S-Video", | ||
1279 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
1280 | .capabilities = V4L2_OUT_CAP_STD, | ||
1281 | .std = V4L2_STD_ALL, | ||
1282 | }, | ||
1283 | .subdev_name = "adv7343", | ||
1284 | .output_route = ADV7343_SVIDEO_ID, | ||
1285 | }, | ||
1265 | }; | 1286 | }; |
1266 | 1287 | ||
1267 | static struct vpif_display_config da850_vpif_display_config = { | 1288 | static struct vpif_display_config da850_vpif_display_config = { |
1268 | .subdevinfo = da850_vpif_subdev, | 1289 | .subdevinfo = da850_vpif_subdev, |
1269 | .subdev_count = ARRAY_SIZE(da850_vpif_subdev), | 1290 | .subdev_count = ARRAY_SIZE(da850_vpif_subdev), |
1270 | .output = vpif_output, | 1291 | .chan_config[0] = { |
1271 | .output_count = ARRAY_SIZE(vpif_output), | 1292 | .outputs = da850_ch0_outputs, |
1293 | .output_count = ARRAY_SIZE(da850_ch0_outputs), | ||
1294 | }, | ||
1272 | .card_name = "DA850/OMAP-L138 Video Display", | 1295 | .card_name = "DA850/OMAP-L138 Video Display", |
1273 | }; | 1296 | }; |
1274 | 1297 | ||