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: 1517831 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 85A643FC71 for ; Fri, 28 Sep 2012 08:51:22 +0000 (UTC) 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 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; }