From patchwork Fri Sep 28 08:50:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 14716 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1THWI6-0005EA-R8 for patchwork@linuxtv.org; Fri, 28 Sep 2012 10:51:22 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1THWI6-0005sg-GX; Fri, 28 Sep 2012 10:51:22 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757063Ab2I1IvS (ORCPT ); Fri, 28 Sep 2012 04:51:18 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:56007 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755124Ab2I1IvR (ORCPT ); Fri, 28 Sep 2012 04:51:17 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XSmnq4GG2z3hhlZ; Fri, 28 Sep 2012 10:51:11 +0200 (CEST) X-Auth-Info: fTYzHJMJPvkCTHrnSSK1IV2xd0h8Bcau4OGV5svHVAw= Received: from localhost (pD9E2F498.dip.t-dialin.net [217.226.244.152]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 3XSmnq33lxzbcjb; Fri, 28 Sep 2012 10:51:11 +0200 (CEST) From: Anatolij Gustschin To: linux-media@vger.kernel.org Cc: Guennadi Liakhovetski , Mauro Carvalho Chehab Subject: [PATCH 2/2] V4L: soc_camera: disable I2C subdev streamon for mpc52xx_csi Date: Fri, 28 Sep 2012 10:50:55 +0200 Message-Id: <1348822255-30875-2-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1348822255-30875-1-git-send-email-agust@denx.de> References: <1348822255-30875-1-git-send-email-agust@denx.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.28.84219 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' With mpc52xx_csi interface I2C subdev streamon after vb2_streamon() doesn't work due to mpc52xx sensor interface glue-logic restrictions. Since mpc5200 doesn't have a camera sensor interface, the sensor on O2D cameras is connected to the LocalPlus bus by special glue-logic. While sensor read-out the sensor will be clocked with the bus chip- select signal as the sensor clock so that the read-out is synchronous with the data accesses on the bus. Therefore, I2C access can't be performed when the glue-logic is setup for sensor read-out. mpc52xx_csi driver for O2D cameras performs I2C subdev streamon in its start_streaming() operation and then disables the I2C bus access by configuring the interface glue-logic for sensor read-out. For above-mentioned reasons we disable this subdev call here. Signed-off-by: Anatolij Gustschin --- drivers/media/platform/soc_camera/soc_camera.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index f6b1c1f..64e0abb 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -809,7 +809,7 @@ static int soc_camera_streamon(struct file *file, void *priv, { struct soc_camera_device *icd = file->private_data; struct soc_camera_host *ici = to_soc_camera_host(icd->parent); - struct v4l2_subdev *sd = soc_camera_to_subdev(icd); + struct v4l2_subdev __maybe_unused *sd = soc_camera_to_subdev(icd); int ret; WARN_ON(priv != file->private_data); @@ -826,8 +826,11 @@ static int soc_camera_streamon(struct file *file, void *priv, else ret = vb2_streamon(&icd->vb2_vidq, i); +#if !defined(CONFIG_VIDEO_MPC52xx_CSI) && \ + !defined(CONFIG_VIDEO_MPC52xx_CSI_MODULE) if (!ret) v4l2_subdev_call(sd, video, s_stream, 1); +#endif return ret; }