From patchwork Mon Aug 17 23:21:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 42204 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7HNNOLa017879 for ; Mon, 17 Aug 2009 23:23:25 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n7HNLwZe030159; Mon, 17 Aug 2009 18:22:03 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n7HNLwI0025692; Mon, 17 Aug 2009 18:21:58 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 77B5780627; Mon, 17 Aug 2009 18:21:58 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dlep35.itg.ti.com (dlep35.itg.ti.com [157.170.170.118]) by linux.omap.com (Postfix) with ESMTP id 15ED980626 for ; Mon, 17 Aug 2009 18:21:56 -0500 (CDT) Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n7HNLtdG021059; Mon, 17 Aug 2009 18:21:55 -0500 (CDT) Received: from gt516km11.gt.design.ti.com (gt516km11.gt.design.ti.com [158.218.100.179]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n7HNLtZ05080; Mon, 17 Aug 2009 18:21:55 -0500 (CDT) Received: from gt516km11.gt.design.ti.com (localhost.localdomain [127.0.0.1]) by gt516km11.gt.design.ti.com (8.13.1/8.13.1) with ESMTP id n7HNLsaW032698; Mon, 17 Aug 2009 19:21:54 -0400 Received: (from a0868495@localhost) by gt516km11.gt.design.ti.com (8.13.1/8.13.1/Submit) id n7HNLss8032695; Mon, 17 Aug 2009 19:21:54 -0400 From: m-karicheri2@ti.com To: linux-media@vger.kernel.org Date: Mon, 17 Aug 2009 19:21:54 -0400 Message-Id: <1250551314-32662-1-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.6.0.4 Cc: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 1/5 - v3]V4L: vpfe capture - adding new fields for vpfe capture enhancements X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Muralidharan Karicheri Resending with V4L prefix..... Restructured the patch to apply cleanly. This will allow compilation after applying each patch. To do this existing fields in the header files are retained and removed later when the new fields are used. Reviewed-by: Hans Verkuil Signed-off-by: Muralidharan Karicheri --- Applies to V4L-DVB linux-next repository include/media/davinci/vpfe_capture.h | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/include/media/davinci/vpfe_capture.h b/include/media/davinci/vpfe_capture.h index 71d8982..196245e 100644 --- a/include/media/davinci/vpfe_capture.h +++ b/include/media/davinci/vpfe_capture.h @@ -47,6 +47,8 @@ struct vpfe_pixel_format { struct v4l2_fmtdesc fmtdesc; /* bytes per pixel */ int bpp; + /* decoder format */ + u32 subdev_pix_fmt; }; struct vpfe_std_info { @@ -61,9 +63,16 @@ struct vpfe_route { u32 output; }; +enum vpfe_subdev_id { + VPFE_SUBDEV_TVP5146 = 1, + VPFE_SUBDEV_MT9T031 = 2 +}; + struct vpfe_subdev_info { - /* Sub device name */ + /* Deprecated. Will be removed in the next patch */ char name[32]; + /* Sub device module name */ + char module_name[32]; /* Sub device group id */ int grp_id; /* Number of inputs supported */ @@ -72,12 +81,16 @@ struct vpfe_subdev_info { struct v4l2_input *inputs; /* Sub dev routing information for each input */ struct vpfe_route *routes; - /* check if sub dev supports routing */ - int can_route; /* ccdc bus/interface configuration */ struct vpfe_hw_if_param ccdc_if_params; /* i2c subdevice board info */ struct i2c_board_info board_info; + /* Is this a camera sub device ? */ + unsigned is_camera:1; + /* check if sub dev supports routing */ + unsigned can_route:1; + /* registered ? */ + unsigned registered:1; }; struct vpfe_config { @@ -92,6 +105,12 @@ struct vpfe_config { /* vpfe clock */ struct clk *vpssclk; struct clk *slaveclk; + /* setup function for the input path */ + int (*setup_input)(enum vpfe_subdev_id id); + /* number of clocks */ + int num_clocks; + /* clocks used for vpfe capture */ + char *clocks[]; }; struct vpfe_device { @@ -102,6 +121,8 @@ struct vpfe_device { struct v4l2_subdev **sd; /* vpfe cfg */ struct vpfe_config *cfg; + /* clock ptrs for vpfe capture */ + struct clk **clks; /* V4l2 device */ struct v4l2_device v4l2_dev; /* parent device */