Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286865
b: refs/heads/master
c: 8134ff5
h: refs/heads/master
i:
  286863: 8fd0f5a
v: v3
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Nicolas Ferre committed Jan 20, 2012
1 parent 3f564c0 commit 52abd34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 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: 6813463cebf25089053cbe25245d15908f896716
refs/heads/master: 8134ff55646bd2c059ddfd0d479882a06d6ef09a
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/include/mach/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extern void __init at91_add_device_eth(struct macb_platform_data *data);
struct at91_usbh_data {
u8 ports; /* number of ports on root hub */
int vbus_pin[2]; /* port power-control pin */
u8 vbus_pin_inverted;
u8 vbus_pin_active_low[2];
u8 overcurrent_supported;
int overcurrent_pin[2];
u8 overcurrent_status[2];
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/usb/host/ohci-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int
if (!gpio_is_valid(pdata->vbus_pin[port]))
return;

gpio_set_value(pdata->vbus_pin[port], !pdata->vbus_pin_inverted ^ enable);
gpio_set_value(pdata->vbus_pin[port],
!pdata->vbus_pin_active_low[port] ^ enable);
}

static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
Expand All @@ -255,7 +256,8 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
if (!gpio_is_valid(pdata->vbus_pin[port]))
return -EINVAL;

return gpio_get_value(pdata->vbus_pin[port]) ^ !pdata->vbus_pin_inverted;
return gpio_get_value(pdata->vbus_pin[port]) ^
!pdata->vbus_pin_active_low[port];
}

/*
Expand Down

0 comments on commit 52abd34

Please sign in to comment.