diff options
author | Peter Chen <peter.chen@freescale.com> | 2013-04-03 16:25:39 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2013-04-11 13:09:04 +0800 |
commit | e865234f0ed82aab1d52d229d87edc10925d42b4 (patch) | |
tree | 9c34d074bab59f17bd23ada961118f205cebfb8e | |
parent | f44c2c9d0132f170c96ab6a98f608206af048f5c (diff) |
ENGR00257130-1 mx6sl_evk: Add Host 1 vbus callback
- Make vbus is off default, and let the driver opens it.
- Add host 1 vbus callback, in that case, the driver can control it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rw-r--r-- | arch/arm/mach-mx6/board-mx6sl_evk.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-mx6/board-mx6sl_evk.c b/arch/arm/mach-mx6/board-mx6sl_evk.c index 729054c9f015..205caa67c96a 100644 --- a/arch/arm/mach-mx6/board-mx6sl_evk.c +++ b/arch/arm/mach-mx6/board-mx6sl_evk.c @@ -1255,6 +1255,14 @@ static void imx6_evk_usbotg_vbus(bool on) gpio_set_value(MX6_BRD_USBOTG1_PWR, 0); } +static void imx6_evk_usbh1_vbus(bool on) +{ + if (on) + gpio_set_value(MX6_BRD_USBOTG2_PWR, 1); + else + gpio_set_value(MX6_BRD_USBOTG2_PWR, 0); +} + static void __init mx6_evk_init_usb(void) { int ret = 0; @@ -1277,9 +1285,10 @@ static void __init mx6_evk_init_usb(void) pr_err("failed to get GPIO MX6_BRD_USBOTG2_PWR:%d\n", ret); return; } - gpio_direction_output(MX6_BRD_USBOTG2_PWR, 1); + gpio_direction_output(MX6_BRD_USBOTG2_PWR, 0); mx6_set_otghost_vbus_func(imx6_evk_usbotg_vbus); + mx6_set_host1_vbus_func(imx6_evk_usbh1_vbus); #ifdef CONFIG_USB_EHCI_ARC_HSIC mx6_usb_h2_init(); |