From patchwork Wed May 30 11:13:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 161939 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0EE7BB706A for ; Wed, 30 May 2012 21:17:17 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SZgqG-0005rO-U3; Wed, 30 May 2012 11:13:29 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SZgqD-0005rB-62 for linux-arm-kernel@lists.infradead.org; Wed, 30 May 2012 11:13:26 +0000 Received: by wgbds1 with SMTP id ds1so3343989wgb.18 for ; Wed, 30 May 2012 04:13:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=nQHLiwnC6ZVs9/59jLp7jFHMkk5/jSIGBkUgXWnG+9k=; b=c5iZGMYReEkEiaNhECqdZrJ0oSu0IJeP98lBuCZUMJx0drtA8UOwa2mzxmGdJrCt55 khtfwuogcYfGrp+8fTiOU3ywTEZV3C9IEktC113XVSN9yCIubCH+2/PXRtWDHfWF+fay Jwo13Ce9ZiWeQOrKp12VtBEhjLR6+3+aOcccU3EzX+9D7E5dsXejE9uFKTdMnzgczsty DPBK0z9dmEUFQX4Y52hjoMsnLntV8SCczdhPWMaNTb2DV5MAUnCaqH829cAUNN/d+J+u dqoVLhVclijJfw6tdyM7f7JjN0tGdUQJMyNMpLawaDNTkdkIavkZJO9LRNVyYVkDTYfw iVNQ== Received: by 10.216.193.129 with SMTP id k1mr9903879wen.201.1338376403176; Wed, 30 May 2012 04:13:23 -0700 (PDT) Received: from localhost.localdomain (96.252.106.212.dynamic.jazztel.es. [212.106.252.96]) by mx.google.com with ESMTPS id i10sm34462598wiy.10.2012.05.30.04.13.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 May 2012 04:13:21 -0700 (PDT) From: Javier Martin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] Visstrim M10: fix gpio handling. Date: Wed, 30 May 2012 13:13:09 +0200 Message-Id: <1338376389-32256-1-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.0.4 X-Gm-Message-State: ALoCoQmlLxEa6SivNiwl8gKjE5YtQF0DkUXfZ7rRLDuj41XZ5jAajqj+9Xb7dNaAcMJ+DUXeF7iP X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Javier Martin X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Some GPIOs in Visstrim M10 are used without being registered. This leads to USB and video malfunctions. This patch registers those GPIOs to solve the issue. Signed-off-by: Javier Martin --- arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index e8741f9..db4aa6f 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c @@ -116,6 +116,8 @@ static const int visstrim_m10_pins[] __initconst = { PB23_PF_USB_PWR, PB24_PF_USB_OC, /* CSI */ + TVP5150_RSTN | GPIO_GPIO | GPIO_OUT, + TVP5150_PWDN | GPIO_GPIO | GPIO_OUT, PB10_PF_CSI_D0, PB11_PF_CSI_D1, PB12_PF_CSI_D2, @@ -182,10 +184,10 @@ static void __init visstrim_camera_init(void) int dma; /* Initialize tvp5150 gpios */ - mxc_gpio_mode(TVP5150_RSTN | GPIO_GPIO | GPIO_OUT); - mxc_gpio_mode(TVP5150_PWDN | GPIO_GPIO | GPIO_OUT); - gpio_set_value(TVP5150_RSTN, 1); - gpio_set_value(TVP5150_PWDN, 0); + gpio_request_one(TVP5150_RSTN, GPIOF_DIR_OUT | GPIOF_INIT_HIGH, + "tvp5150_rstn"); + gpio_request_one(TVP5150_PWDN, GPIOF_DIR_OUT | GPIOF_INIT_LOW, + "tvp5150_pwdn"); ndelay(1); gpio_set_value(TVP5150_PWDN, 1); @@ -414,7 +416,8 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { /* USB OTG */ static int otg_phy_init(struct platform_device *pdev) { - gpio_set_value(OTG_PHY_CS_GPIO, 0); + gpio_request_one(OTG_PHY_CS_GPIO, GPIOF_DIR_OUT | GPIOF_INIT_LOW, + "usbotg_cs"); mdelay(10);