summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-07-13 11:29:16 +0200
committerArnd Bergmann <arnd@arndb.de>2011-09-10 23:03:13 +0200
commite7da859e424ccc30d2ef87dbabf655ad3d59f291 (patch)
treee59f994cbaa45322bef762014190160b28f23e77 /drivers/usb
parent0af4316babb64c6703c113a89462ff7843767f24 (diff)
downloadop-kernel-dev-e7da859e424ccc30d2ef87dbabf655ad3d59f291.zip
op-kernel-dev-e7da859e424ccc30d2ef87dbabf655ad3d59f291.tar.gz
at91: ohci-at91: add vbus_pin_inverted platform attribute
The existing OHCI AT91 driver made the assumption that the enable input of the USB power switch was active low. However, some USB power switches such as the Micrel MIC2026-1 [1] have an active high input to enable the power. A new vbus_pin_inverted attribute is added to the at91_usbh_data structure so that board files can tell the OHCI driver if the vbus pin logic is active low or active high. [1] http://www.micrel.com/page.do?page=product-info/products/mic2026.shtml Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ohci-at91.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index e08cb10..5dd381f 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]);
}
}
OpenPOWER on IntegriCloud