diff options
-rw-r--r-- | arch/arm/mach-at91/include/mach/board.h | 1 | ||||
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index ed544a0d5a1d..61d52dc05051 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h @@ -98,6 +98,7 @@ extern void __init at91_add_device_eth(struct at91_eth_data *data); struct at91_usbh_data { u8 ports; /* number of ports on root hub */ u8 vbus_pin[2]; /* port power-control pin */ + u8 vbus_pin_inverted; }; extern void __init at91_add_device_usbh(struct at91_usbh_data *data); extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index e08cb10d1aca..5dd381fc2ddb 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -279,7 +279,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) if (pdata->vbus_pin[i] <= 0) continue; gpio_request(pdata->vbus_pin[i], "ohci_vbus"); - gpio_direction_output(pdata->vbus_pin[i], 0); + gpio_direction_output(pdata->vbus_pin[i], pdata->vbus_pin_inverted); } } @@ -296,7 +296,7 @@ static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(pdata->vbus_pin); i++) { if (pdata->vbus_pin[i] <= 0) continue; - gpio_direction_output(pdata->vbus_pin[i], 1); + gpio_direction_output(pdata->vbus_pin[i], !pdata->vbus_pin_inverted); gpio_free(pdata->vbus_pin[i]); } } |