Commit 0d4f35f3 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 882084ad
...@@ -1213,12 +1213,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { ...@@ -1213,12 +1213,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
I2C_BOARD_INFO("tvp5146", 0x5d), I2C_BOARD_INFO("tvp5146", 0x5d),
.platform_data = &tvp5146_pdata, .platform_data = &tvp5146_pdata,
}, },
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
{ {
.name = TVP5147_CH1, .name = TVP5147_CH1,
...@@ -1226,12 +1220,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { ...@@ -1226,12 +1220,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
I2C_BOARD_INFO("tvp5146", 0x5c), I2C_BOARD_INFO("tvp5146", 0x5c),
.platform_data = &tvp5146_pdata, .platform_data = &tvp5146_pdata,
}, },
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
}; };
...@@ -1241,10 +1229,22 @@ static struct vpif_capture_config da850_vpif_capture_config = { ...@@ -1241,10 +1229,22 @@ static struct vpif_capture_config da850_vpif_capture_config = {
.chan_config[0] = { .chan_config[0] = {
.inputs = da850_ch0_inputs, .inputs = da850_ch0_inputs,
.input_count = ARRAY_SIZE(da850_ch0_inputs), .input_count = ARRAY_SIZE(da850_ch0_inputs),
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
.chan_config[1] = { .chan_config[1] = {
.inputs = da850_ch1_inputs, .inputs = da850_ch1_inputs,
.input_count = ARRAY_SIZE(da850_ch1_inputs), .input_count = ARRAY_SIZE(da850_ch1_inputs),
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
.card_name = "DA850/OMAP-L138 Video Capture", .card_name = "DA850/OMAP-L138 Video Capture",
}; };
......
...@@ -601,12 +601,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { ...@@ -601,12 +601,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
I2C_BOARD_INFO("tvp5146", 0x5d), I2C_BOARD_INFO("tvp5146", 0x5d),
.platform_data = &tvp5146_pdata, .platform_data = &tvp5146_pdata,
}, },
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
{ {
.name = TVP5147_CH1, .name = TVP5147_CH1,
...@@ -614,12 +608,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { ...@@ -614,12 +608,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
I2C_BOARD_INFO("tvp5146", 0x5c), I2C_BOARD_INFO("tvp5146", 0x5c),
.platform_data = &tvp5146_pdata, .platform_data = &tvp5146_pdata,
}, },
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
}; };
...@@ -661,10 +649,22 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = { ...@@ -661,10 +649,22 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = {
.chan_config[0] = { .chan_config[0] = {
.inputs = dm6467_ch0_inputs, .inputs = dm6467_ch0_inputs,
.input_count = ARRAY_SIZE(dm6467_ch0_inputs), .input_count = ARRAY_SIZE(dm6467_ch0_inputs),
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
.chan_config[1] = { .chan_config[1] = {
.inputs = dm6467_ch1_inputs, .inputs = dm6467_ch1_inputs,
.input_count = ARRAY_SIZE(dm6467_ch1_inputs), .input_count = ARRAY_SIZE(dm6467_ch1_inputs),
.vpif_if = {
.if_type = VPIF_IF_BT656,
.hd_pol = 1,
.vd_pol = 1,
.fid_pol = 0,
},
}, },
}; };
......
...@@ -1310,7 +1310,7 @@ static int vpif_set_input( ...@@ -1310,7 +1310,7 @@ static int vpif_set_input(
ch->input_idx = index; ch->input_idx = index;
ch->sd = sd; ch->sd = sd;
/* copy interface parameters to vpif */ /* copy interface parameters to vpif */
ch->vpifparams.iface = subdev_info->vpif_if; ch->vpifparams.iface = chan_cfg->vpif_if;
/* update tvnorms from the sub device input info */ /* update tvnorms from the sub device input info */
ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std; ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std;
......
...@@ -37,7 +37,6 @@ struct vpif_interface { ...@@ -37,7 +37,6 @@ struct vpif_interface {
struct vpif_subdev_info { struct vpif_subdev_info {
const char *name; const char *name;
struct i2c_board_info board_info; struct i2c_board_info board_info;
struct vpif_interface vpif_if;
}; };
struct vpif_display_config { struct vpif_display_config {
...@@ -59,6 +58,7 @@ struct vpif_input { ...@@ -59,6 +58,7 @@ struct vpif_input {
}; };
struct vpif_capture_chan_config { struct vpif_capture_chan_config {
struct vpif_interface vpif_if;
const struct vpif_input *inputs; const struct vpif_input *inputs;
int input_count; int input_count;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment