diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-20 08:06:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 21:09:57 -0400 |
commit | 0d4f35f3f0044303abfff57441dd1e98f96ea935 (patch) | |
tree | 5bdae27a3bc2c84c581d973e4d34195a8a272b0b | |
parent | 882084ad0f9791f2e8386ba3f9f3836f0c3e9fa6 (diff) |
[media] davinci: move struct vpif_interface to chan_cfg
struct vpif_interface is channel specific, not subdev specific.
Move it to the channel config.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 24 | ||||
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 2 | ||||
-rw-r--r-- | include/media/davinci/vpif_types.h | 2 |
4 files changed, 26 insertions, 26 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 87bd249ffb9c..8663df3d2a58 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -1213,12 +1213,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { | |||
1213 | I2C_BOARD_INFO("tvp5146", 0x5d), | 1213 | I2C_BOARD_INFO("tvp5146", 0x5d), |
1214 | .platform_data = &tvp5146_pdata, | 1214 | .platform_data = &tvp5146_pdata, |
1215 | }, | 1215 | }, |
1216 | .vpif_if = { | ||
1217 | .if_type = VPIF_IF_BT656, | ||
1218 | .hd_pol = 1, | ||
1219 | .vd_pol = 1, | ||
1220 | .fid_pol = 0, | ||
1221 | }, | ||
1222 | }, | 1216 | }, |
1223 | { | 1217 | { |
1224 | .name = TVP5147_CH1, | 1218 | .name = TVP5147_CH1, |
@@ -1226,12 +1220,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { | |||
1226 | I2C_BOARD_INFO("tvp5146", 0x5c), | 1220 | I2C_BOARD_INFO("tvp5146", 0x5c), |
1227 | .platform_data = &tvp5146_pdata, | 1221 | .platform_data = &tvp5146_pdata, |
1228 | }, | 1222 | }, |
1229 | .vpif_if = { | ||
1230 | .if_type = VPIF_IF_BT656, | ||
1231 | .hd_pol = 1, | ||
1232 | .vd_pol = 1, | ||
1233 | .fid_pol = 0, | ||
1234 | }, | ||
1235 | }, | 1223 | }, |
1236 | }; | 1224 | }; |
1237 | 1225 | ||
@@ -1241,10 +1229,22 @@ static struct vpif_capture_config da850_vpif_capture_config = { | |||
1241 | .chan_config[0] = { | 1229 | .chan_config[0] = { |
1242 | .inputs = da850_ch0_inputs, | 1230 | .inputs = da850_ch0_inputs, |
1243 | .input_count = ARRAY_SIZE(da850_ch0_inputs), | 1231 | .input_count = ARRAY_SIZE(da850_ch0_inputs), |
1232 | .vpif_if = { | ||
1233 | .if_type = VPIF_IF_BT656, | ||
1234 | .hd_pol = 1, | ||
1235 | .vd_pol = 1, | ||
1236 | .fid_pol = 0, | ||
1237 | }, | ||
1244 | }, | 1238 | }, |
1245 | .chan_config[1] = { | 1239 | .chan_config[1] = { |
1246 | .inputs = da850_ch1_inputs, | 1240 | .inputs = da850_ch1_inputs, |
1247 | .input_count = ARRAY_SIZE(da850_ch1_inputs), | 1241 | .input_count = ARRAY_SIZE(da850_ch1_inputs), |
1242 | .vpif_if = { | ||
1243 | .if_type = VPIF_IF_BT656, | ||
1244 | .hd_pol = 1, | ||
1245 | .vd_pol = 1, | ||
1246 | .fid_pol = 0, | ||
1247 | }, | ||
1248 | }, | 1248 | }, |
1249 | .card_name = "DA850/OMAP-L138 Video Capture", | 1249 | .card_name = "DA850/OMAP-L138 Video Capture", |
1250 | }; | 1250 | }; |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 6f329caca6e8..2647b8966dd2 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -601,12 +601,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { | |||
601 | I2C_BOARD_INFO("tvp5146", 0x5d), | 601 | I2C_BOARD_INFO("tvp5146", 0x5d), |
602 | .platform_data = &tvp5146_pdata, | 602 | .platform_data = &tvp5146_pdata, |
603 | }, | 603 | }, |
604 | .vpif_if = { | ||
605 | .if_type = VPIF_IF_BT656, | ||
606 | .hd_pol = 1, | ||
607 | .vd_pol = 1, | ||
608 | .fid_pol = 0, | ||
609 | }, | ||
610 | }, | 604 | }, |
611 | { | 605 | { |
612 | .name = TVP5147_CH1, | 606 | .name = TVP5147_CH1, |
@@ -614,12 +608,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { | |||
614 | I2C_BOARD_INFO("tvp5146", 0x5c), | 608 | I2C_BOARD_INFO("tvp5146", 0x5c), |
615 | .platform_data = &tvp5146_pdata, | 609 | .platform_data = &tvp5146_pdata, |
616 | }, | 610 | }, |
617 | .vpif_if = { | ||
618 | .if_type = VPIF_IF_BT656, | ||
619 | .hd_pol = 1, | ||
620 | .vd_pol = 1, | ||
621 | .fid_pol = 0, | ||
622 | }, | ||
623 | }, | 611 | }, |
624 | }; | 612 | }; |
625 | 613 | ||
@@ -661,10 +649,22 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = { | |||
661 | .chan_config[0] = { | 649 | .chan_config[0] = { |
662 | .inputs = dm6467_ch0_inputs, | 650 | .inputs = dm6467_ch0_inputs, |
663 | .input_count = ARRAY_SIZE(dm6467_ch0_inputs), | 651 | .input_count = ARRAY_SIZE(dm6467_ch0_inputs), |
652 | .vpif_if = { | ||
653 | .if_type = VPIF_IF_BT656, | ||
654 | .hd_pol = 1, | ||
655 | .vd_pol = 1, | ||
656 | .fid_pol = 0, | ||
657 | }, | ||
664 | }, | 658 | }, |
665 | .chan_config[1] = { | 659 | .chan_config[1] = { |
666 | .inputs = dm6467_ch1_inputs, | 660 | .inputs = dm6467_ch1_inputs, |
667 | .input_count = ARRAY_SIZE(dm6467_ch1_inputs), | 661 | .input_count = ARRAY_SIZE(dm6467_ch1_inputs), |
662 | .vpif_if = { | ||
663 | .if_type = VPIF_IF_BT656, | ||
664 | .hd_pol = 1, | ||
665 | .vd_pol = 1, | ||
666 | .fid_pol = 0, | ||
667 | }, | ||
668 | }, | 668 | }, |
669 | }; | 669 | }; |
670 | 670 | ||
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index c4db0ef91595..83b80baf868a 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c | |||
@@ -1310,7 +1310,7 @@ static int vpif_set_input( | |||
1310 | ch->input_idx = index; | 1310 | ch->input_idx = index; |
1311 | ch->sd = sd; | 1311 | ch->sd = sd; |
1312 | /* copy interface parameters to vpif */ | 1312 | /* copy interface parameters to vpif */ |
1313 | ch->vpifparams.iface = subdev_info->vpif_if; | 1313 | ch->vpifparams.iface = chan_cfg->vpif_if; |
1314 | 1314 | ||
1315 | /* update tvnorms from the sub device input info */ | 1315 | /* update tvnorms from the sub device input info */ |
1316 | ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std; | 1316 | ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std; |
diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h index a422ed085cd2..65e8fe17e116 100644 --- a/include/media/davinci/vpif_types.h +++ b/include/media/davinci/vpif_types.h | |||
@@ -37,7 +37,6 @@ struct vpif_interface { | |||
37 | struct vpif_subdev_info { | 37 | struct vpif_subdev_info { |
38 | const char *name; | 38 | const char *name; |
39 | struct i2c_board_info board_info; | 39 | struct i2c_board_info board_info; |
40 | struct vpif_interface vpif_if; | ||
41 | }; | 40 | }; |
42 | 41 | ||
43 | struct vpif_display_config { | 42 | struct vpif_display_config { |
@@ -59,6 +58,7 @@ struct vpif_input { | |||
59 | }; | 58 | }; |
60 | 59 | ||
61 | struct vpif_capture_chan_config { | 60 | struct vpif_capture_chan_config { |
61 | struct vpif_interface vpif_if; | ||
62 | const struct vpif_input *inputs; | 62 | const struct vpif_input *inputs; |
63 | int input_count; | 63 | int input_count; |
64 | }; | 64 | }; |