Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105145
b: refs/heads/master
c: 8fb105f
h: refs/heads/master
i:
  105143: 46a7e6e
v: v3
  • Loading branch information
Ian Molton committed Jul 10, 2008
1 parent 700867d commit 5c35c7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3d354b8d8d676c97794a5b984613d51ad683f17
refs/heads/master: 8fb105f5cc7f31ff37755945378a668f4c21590e
6 changes: 4 additions & 2 deletions trunk/drivers/usb/gadget/pxa25x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,21 @@ 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);
}

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);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-arm/mach/udc_pxa2xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

0 comments on commit 5c35c7f

Please sign in to comment.