]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00257130-1 mx6sl_evk: Add Host 1 vbus callback
authorPeter Chen <peter.chen@freescale.com>
Wed, 3 Apr 2013 08:25:39 +0000 (16:25 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:13:56 +0000 (14:13 +0200)
- 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>
arch/arm/mach-mx6/board-mx6sl_evk.c

index 729054c9f01595d01b5df5f147790ee76f598228..205caa67c96ab56ebaa22715e7e2f058d4e67ea5 100644 (file)
@@ -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();