From patchwork Mon Oct 11 16:36:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 67436 X-Patchwork-Delegate: brad.figg@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 77624B6F11 for ; Tue, 12 Oct 2010 03:36:24 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5LMJ-00045d-Lt; Mon, 11 Oct 2010 17:36:19 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5LMH-00045D-Mf for kernel-team@lists.ubuntu.com; Mon, 11 Oct 2010 17:36:17 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P5LMF-0001Uo-20 for ; Mon, 11 Oct 2010 17:36:16 +0100 Received: from s0106002369de4dac.cg.shawcable.net ([70.73.24.112] helo=[192.168.1.100]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P5LME-00011R-CD for kernel-team@lists.ubuntu.com; Mon, 11 Oct 2010 17:36:15 +0100 Subject: [Maverick SRU][PATCH 1/6] UBUNTU - ARM: igepv2: Adding support for VBUS and overcurrent From: Mathieu Poirier To: kernel-team@lists.ubuntu.com Date: Mon, 11 Oct 2010 10:36:12 -0600 Message-ID: <1286814972.3125.32.camel@black> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com SRU Justification: Impact: This patch is part of a series of fix for the IGEPv2. The board features multiple GPIOs that must be initialized in order for signals to be considered by the processor. Fix: GPIOs for VBUS and over current are requested and their direction set in the GPIO setup routine, part of the initial initialization of the board. Testcase: Booting the board without the fix will see input and outputs from the external VBUS power switch and over current ignored. >From 452f4fd729b6a464a91ab5e461189f2a0a637fe5 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 11 Oct 2010 10:08:18 -0600 Subject: [PATCH 1/6] UBUNTU - ARM: igepv2: Adding support for VBUS and overcurrent GPIO for various devices are missing from the board initialization. This patch adds support for the VBUS and over current gpios. Without this patch, input/outputs from these two sources are ignored. This work has also been submitted here: http://marc.info/?l=linux-omap&m=128628834619169&w=2 BugLink: https://bugs.launchpad.net/bugs/651589 Signed-off-by: Enric Balletbo i Serra Signed-off-by: Mathieu J Poirier Signed-off-by: Lee Jones --- arch/arm/mach-omap2/board-igep0020.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index d55c57b..0b999f8 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -274,6 +274,22 @@ static int igep2_twl_gpio_setup(struct device *dev, igep2_vmmc1_supply.dev = mmc[0].dev; igep2_vmmc2_supply.dev = mmc[1].dev; + /* + * REVISIT: need ehci-omap hooks for external VBUS + * power switch and overcurrent detect + */ + if ((gpio_request(gpio + 1, "GPIO_EHCI_NOC") < 0) || + (gpio_direction_input(gpio + 1) < 0)) + pr_err("IGEP2: Could not obtain gpio for EHCI NOC"); + + /* + * TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN + * (out, active low) + */ + if ((gpio_request(gpio + TWL4030_GPIO_MAX, "GPIO_USBH_CPEN") < 0) || + (gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0) < 0)) + pr_err("IGEP2: Could not obtain gpio for USBH_CPEN"); + return 0; };