From patchwork Fri Jul 29 10:56:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1020252 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6TAxalR015311 for ; Fri, 29 Jul 2011 10:59:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756061Ab1G2K7X (ORCPT ); Fri, 29 Jul 2011 06:59:23 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:61187 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755692Ab1G2K5D (ORCPT ); Fri, 29 Jul 2011 06:57:03 -0400 Received: from axis700.grange (dslb-084-061-105-216.pools.arcor-ip.net [84.61.105.216]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0Lgoo2-1R9Bed27NO-00oIX4; Fri, 29 Jul 2011 12:57:01 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 8D60D189B6D for ; Fri, 29 Jul 2011 12:57:00 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1QmkkW-0007nb-7v for linux-media@vger.kernel.org; Fri, 29 Jul 2011 12:57:00 +0200 From: Guennadi Liakhovetski To: linux-media@vger.kernel.org Subject: [PATCH 13/59] V4L: ov5642: support the new mbus-config subdev ops Date: Fri, 29 Jul 2011 12:56:13 +0200 Message-Id: <1311937019-29914-14-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1311937019-29914-1-git-send-email-g.liakhovetski@gmx.de> References: <1311937019-29914-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:C0K/5UIyrQXGijHQySCQCesB7Zdf6UcdvTcSauZR9VC SuinwcSwRNWTO9mUUctkVBURiOemlbIIeXsGocH68imSOAQa1q mh1b+TnEWamQwt+o6zUTS1seBy4eh3jETH027Y1jyCgI0tp6IU mRwYX88IfIC60cCpnI5u/1zeuyOSepWD7qFru5J3qADz/geUon 34QTlzagB6QHK2v/MG/3kD8ycOakE6kuVwnq5R0dVE= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 29 Jul 2011 10:59:37 +0000 (UTC) Extend the driver to also support [gs]_mbus_config() subdevice video operations. Signed-off-by: Guennadi Liakhovetski --- drivers/media/video/ov5642.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/ov5642.c b/drivers/media/video/ov5642.c index 3cdae97..60ffc60 100644 --- a/drivers/media/video/ov5642.c +++ b/drivers/media/video/ov5642.c @@ -854,6 +854,17 @@ static int ov5642_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) return 0; } +static int ov5642_g_mbus_config(struct v4l2_subdev *sd, + struct v4l2_mbus_config *cfg) +{ + cfg->type = V4L2_MBUS_CSI2; + cfg->flags = V4L2_MBUS_CSI2_2_LANE | + V4L2_MBUS_CSI2_CHANNEL_0 | + V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; + + return 0; +} + static struct v4l2_subdev_video_ops ov5642_subdev_video_ops = { .s_mbus_fmt = ov5642_s_fmt, .g_mbus_fmt = ov5642_g_fmt, @@ -861,6 +872,7 @@ static struct v4l2_subdev_video_ops ov5642_subdev_video_ops = { .enum_mbus_fmt = ov5642_enum_fmt, .g_crop = ov5642_g_crop, .cropcap = ov5642_cropcap, + .g_mbus_config = ov5642_g_mbus_config, }; static struct v4l2_subdev_core_ops ov5642_subdev_core_ops = {