linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: eballetbo@gmail.com (Enric Balletbo i Serra)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 1/6] omap3: Add external VBUS power switch and overcurrent detect on IGEP v2 board.
Date: Fri,  1 Oct 2010 23:09:04 +0200	[thread overview]
Message-ID: <1285967349-32767-2-git-send-email-eballetbo@gmail.com> (raw)
In-Reply-To: <1285967349-32767-1-git-send-email-eballetbo@gmail.com>

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.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
---
 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 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;
 };
 
-- 
1.7.0.4

  reply	other threads:[~2010-10-01 21:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 21:09 [PATCHv3 0/6] omap3: Various fixes and improvements for IGEP v2 board Enric Balletbo i Serra
2010-10-01 21:09 ` Enric Balletbo i Serra [this message]
2010-10-02  8:04   ` [PATCHv3 1/6] omap3: Add external VBUS power switch and overcurrent detect on " David Cohen
2010-10-02 10:12     ` Enric Balletbò i Serra
2010-10-05 10:35       ` David Cohen
2010-10-05 14:28         ` Enric Balletbò i Serra
2010-10-01 21:09 ` [PATCHv3 2/6] omap3: fix and improve the LED handling " Enric Balletbo i Serra
2010-10-01 21:09 ` [PATCHv3 3/6] omap3: Introduce function to detect the IGEP v2 hardware revision Enric Balletbo i Serra
2010-10-01 21:09 ` [PATCHv3 4/6] omap3: Fix handling some GPIO's for WLAN-BT combo on IGEP v2 Enric Balletbo i Serra
2010-10-01 21:09 ` [PATCHv3 5/6] omap3: Add i2c eeprom driver to read EDID " Enric Balletbo i Serra
2010-10-01 21:09 ` [PATCHv3 6/6] omap3: Remove VMMC2 regulator " Enric Balletbo i Serra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285967349-32767-2-git-send-email-eballetbo@gmail.com \
    --to=eballetbo@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).