From patchwork Tue Sep 18 10:53:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 1528081 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork2.kernel.org (Postfix) with ESMTP id C1070DF280 for ; Sat, 29 Sep 2012 06:54:51 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8T6rQhV011951; Sat, 29 Sep 2012 01:53:26 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8T6rQPu014658; Sat, 29 Sep 2012 01:53:26 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Sat, 29 Sep 2012 01:53:25 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8T6rQPW013279; Sat, 29 Sep 2012 01:53:26 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4CA6F80627; Sat, 29 Sep 2012 01:53:26 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id 2076980627 for ; Tue, 18 Sep 2012 05:53:33 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id q8IArXVJ009378 for ; Tue, 18 Sep 2012 05:53:33 -0500 (CDT) Received: from psmtp.com (na3sys009amx237.postini.com [74.125.149.121]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id q8IArVMM012907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Sep 2012 05:53:31 -0500 Received: from ams-iport-4.cisco.com ([144.254.224.147]) (using TLSv1) by na3sys009amx237.postini.com ([74.125.148.10]) with SMTP; Tue, 18 Sep 2012 10:53:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4445; q=dns/txt; s=iport; t=1347965612; x=1349175212; h=from:to:cc:subject:date:message-id; bh=kwmkBOYs9r2PHNHkWbnrhkuCxHVmoG+1jP9j8qfrJEA=; b=XFuz/21tvfXeEmzStygRk+imrnEY20/2GWA8OPlBXrpLPhO4NWdIrhz8 S4zPZz/YiQ8qn/NUfaoN5mKYLyxc17HKY5WR8S4tlNbTsH4SKwfd75L5T 6MCgAQ2lQBwUpX+JjlwzGx87IVTSQ7hGP49/kjEOXWUO5IDqnpA7BzOGQ w=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAHpRWFCQ/khR/2dsb2JhbABFvDOBB4IhAQEEEgEUUhBRVxkih16aIaA1kgkDlWKJNYUDgWmCaA X-IronPort-AV: E=Sophos;i="4.80,442,1344211200"; d="scan'208";a="8128506" Received: from ams-core-1.cisco.com ([144.254.72.81]) by ams-iport-4.cisco.com with ESMTP; 18 Sep 2012 10:53:29 +0000 Received: from cobaltpc1.cisco.com (dhcp-10-54-92-107.cisco.com [10.54.92.107]) by ams-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id q8IArQ4Z012350; Tue, 18 Sep 2012 10:53:29 GMT From: Hans Verkuil To: Subject: [RFCv1 PATCH 11/11] davinci: move struct vpif_interface to chan_cfg. Date: Tue, 18 Sep 2012 12:53:13 +0200 Message-ID: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0003) s cv gt3 GT2 gt1 r p m c X-pstn-addresses: from [82/3] X-Mailman-Approved-At: Sat, 29 Sep 2012 01:48:44 -0500 CC: DLOS X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com struct vpif_interface is channel specific, not subdev specific. Move it to the channel config. Signed-off-by: Hans Verkuil --- arch/arm/mach-davinci/board-da850-evm.c | 24 ++++++++++++------------ arch/arm/mach-davinci/board-dm646x-evm.c | 24 ++++++++++++------------ drivers/media/video/davinci/vpif_capture.c | 2 +- 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 514d4d4..3081ea4 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1211,12 +1211,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { I2C_BOARD_INFO("tvp5146", 0x5d), .platform_data = &tvp5146_pdata, }, - .vpif_if = { - .if_type = VPIF_IF_BT656, - .hd_pol = 1, - .vd_pol = 1, - .fid_pol = 0, - }, }, { .name = TVP5147_CH1, @@ -1224,12 +1218,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { I2C_BOARD_INFO("tvp5146", 0x5c), .platform_data = &tvp5146_pdata, }, - .vpif_if = { - .if_type = VPIF_IF_BT656, - .hd_pol = 1, - .vd_pol = 1, - .fid_pol = 0, - }, }, }; @@ -1239,10 +1227,22 @@ static struct vpif_capture_config da850_vpif_capture_config = { .chan_config[0] = { .inputs = 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] = { .inputs = 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", }; diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 0daec7e..ad249c7 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[] = { I2C_BOARD_INFO("tvp5146", 0x5d), .platform_data = &tvp5146_pdata, }, - .vpif_if = { - .if_type = VPIF_IF_BT656, - .hd_pol = 1, - .vd_pol = 1, - .fid_pol = 0, - }, }, { .name = TVP5147_CH1, @@ -614,12 +608,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { I2C_BOARD_INFO("tvp5146", 0x5c), .platform_data = &tvp5146_pdata, }, - .vpif_if = { - .if_type = VPIF_IF_BT656, - .hd_pol = 1, - .vd_pol = 1, - .fid_pol = 0, - }, }, }; @@ -659,10 +647,22 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = { .chan_config[0] = { .inputs = 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] = { .inputs = 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, + }, }, }; diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index 5266167..466f02d 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c @@ -1295,7 +1295,7 @@ static int vpif_set_input( ch->input_idx = index; ch->sd = sd; /* 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 */ 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 a422ed0..65e8fe1 100644 --- a/include/media/davinci/vpif_types.h +++ b/include/media/davinci/vpif_types.h @@ -37,7 +37,6 @@ struct vpif_interface { struct vpif_subdev_info { const char *name; struct i2c_board_info board_info; - struct vpif_interface vpif_if; }; struct vpif_display_config { @@ -59,6 +58,7 @@ struct vpif_input { }; struct vpif_capture_chan_config { + struct vpif_interface vpif_if; const struct vpif_input *inputs; int input_count; };