From patchwork Tue Oct 5 14:15:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo Serra X-Patchwork-Id: 232841 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o95EFXYW022600 for ; Tue, 5 Oct 2010 14:15:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384Ab0JEOPe (ORCPT ); Tue, 5 Oct 2010 10:15:34 -0400 Received: from mail-ww0-f42.google.com ([74.125.82.42]:62571 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311Ab0JEOPe (ORCPT ); Tue, 5 Oct 2010 10:15:34 -0400 Received: by wwe15 with SMTP id 15so288548wwe.1 for ; Tue, 05 Oct 2010 07:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=XIli5KB/pxP5TbpAv0PzWbRl0X/jJ0WJZY7abyDWFjE=; b=RB+7E8oBUAMNyU2lWm/f/GcWnWh932Fntila3fVlNSOnVvHPBSMn0fyfHJGpBfNd28 pbxAukhQKTxHwid9juxLRMgmrlFggdQLZofKW+UX3RDZdMDuWMZq4ZVI2+qZTFfEcMlJ p7+U5fJhI6tQJJLm0ojMu7nCtgCZfO0SPBFrw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=uRGUTknYl8/XA+54dASfcNCpjnUNudIeZxtINlH6/Oz4X0IdRFGEoNMKCeu3nCYviq nYlp2Eco3PMECk3GDqEC5qIqOU+l81mjFtNbqmITQ0pQe3qm3wT9TMrQRsji3Q1I8Aqe MSO5dvg7WcQDFoadf3JySL9vWN7ax6xEV4DfE= Received: by 10.216.0.76 with SMTP id 54mr9262831wea.49.1286288132721; Tue, 05 Oct 2010 07:15:32 -0700 (PDT) Received: from localhost.localdomain (68.Red-217-125-26.staticIP.rima-tde.net [217.125.26.68]) by mx.google.com with ESMTPS id n40sm3928496weq.29.2010.10.05.07.15.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Oct 2010 07:15:31 -0700 (PDT) From: Enric Balletbo i Serra To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Enric Balletbo i Serra Subject: [PATCHv4 1/6] omap3: Add external VBUS power switch and overcurrent detect on IGEP v2 board. Date: Tue, 5 Oct 2010 16:15:17 +0200 Message-Id: <1286288122-16834-2-git-send-email-eballetbo@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286288122-16834-1-git-send-email-eballetbo@gmail.com> References: <1286288122-16834-1-git-send-email-eballetbo@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 05 Oct 2010 14:15:35 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 175f043..07dbdb7 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; };