summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/blackfin.c
diff options
context:
space:
mode:
authorCliff Cai <cliff.cai@analog.com>2010-03-12 09:29:10 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 22:21:32 +0200
commit6ddc6dae4ab559b648bc348e3a48e113e92ab4a2 (patch)
tree0a67e89a4501ed974217f02e1a0e86d21f15589b /drivers/usb/musb/blackfin.c
parentUSB: MUSB: Add OMAP4 support in MUSB driver (diff)
downloadlinux-6ddc6dae4ab559b648bc348e3a48e113e92ab4a2.tar.xz
linux-6ddc6dae4ab559b648bc348e3a48e113e92ab4a2.zip
USB: musb: allow the Blackfin vrsel gpio to be active low
Rather than hardcoding the gpio levels for vrsel, allow the platform resources to handle this so boards can be active high or low. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/blackfin.c')
-rw-r--r--drivers/usb/musb/blackfin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 7c71eb422a9c..eb4392f904e4 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -238,10 +238,10 @@ static void bfin_vbus_power(struct musb *musb, int is_on, int sleeping)
static void bfin_set_vbus(struct musb *musb, int is_on)
{
- if (is_on)
- gpio_set_value(musb->config->gpio_vrsel, 1);
- else
- gpio_set_value(musb->config->gpio_vrsel, 0);
+ int value = musb->config->gpio_vrsel_active;
+ if (!is_on)
+ value = !value;
+ gpio_set_value(musb->config->gpio_vrsel, value);
DBG(1, "VBUS %s, devctl %02x "
/* otg %3x conf %08x prcm %08x */ "\n",