From 5c35c7f700d7861346ef6712a69fe8609a7bbf3f Mon Sep 17 00:00:00 2001 From: Ian Molton Date: Wed, 25 Jun 2008 22:34:51 +0100 Subject: [PATCH] --- yaml --- r: 105145 b: refs/heads/master c: 8fb105f5cc7f31ff37755945378a668f4c21590e h: refs/heads/master i: 105143: 46a7e6e70ad9a142c23f45c7396f7e5812d0524a v: v3 --- [refs] | 2 +- trunk/drivers/usb/gadget/pxa25x_udc.c | 6 ++++-- trunk/include/asm-arm/mach/udc_pxa2xx.h | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7090a2fff1db..3954f1d43a31 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b3d354b8d8d676c97794a5b984613d51ad683f17 +refs/heads/master: 8fb105f5cc7f31ff37755945378a668f4c21590e diff --git a/trunk/drivers/usb/gadget/pxa25x_udc.c b/trunk/drivers/usb/gadget/pxa25x_udc.c index 031dceb93023..5d50031938ab 100644 --- a/trunk/drivers/usb/gadget/pxa25x_udc.c +++ b/trunk/drivers/usb/gadget/pxa25x_udc.c @@ -152,9 +152,10 @@ static int is_vbus_present(void) static void pullup_off(void) { struct pxa2xx_udc_mach_info *mach = the_controller->mach; + int off_level = mach->gpio_pullup_inverted; if (mach->gpio_pullup) - gpio_set_value(mach->gpio_pullup, 0); + gpio_set_value(mach->gpio_pullup, off_level); else if (mach->udc_command) mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); } @@ -162,9 +163,10 @@ static void pullup_off(void) static void pullup_on(void) { struct pxa2xx_udc_mach_info *mach = the_controller->mach; + int on_level = !mach->gpio_pullup_inverted; if (mach->gpio_pullup) - gpio_set_value(mach->gpio_pullup, 1); + gpio_set_value(mach->gpio_pullup, on_level); else if (mach->udc_command) mach->udc_command(PXA2XX_UDC_CMD_CONNECT); } diff --git a/trunk/include/asm-arm/mach/udc_pxa2xx.h b/trunk/include/asm-arm/mach/udc_pxa2xx.h index f9f3606986c2..9e5ed7c0f27f 100644 --- a/trunk/include/asm-arm/mach/udc_pxa2xx.h +++ b/trunk/include/asm-arm/mach/udc_pxa2xx.h @@ -23,6 +23,7 @@ struct pxa2xx_udc_mach_info { */ bool gpio_vbus_inverted; u16 gpio_vbus; /* high == vbus present */ + bool gpio_pullup_inverted; u16 gpio_pullup; /* high == pullup activated */ };