]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
sh: ecovec: care CN5 VBUS if USB host mode
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 1 Aug 2012 07:54:58 +0000 (00:54 -0700)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 1 Aug 2012 08:14:42 +0000 (17:14 +0900)
renesas_usbhs driver can control both USB Host/Gadget,
but it needs VBUS output if Host mode.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/mach-ecovec24/setup.c

index a06c5c8a14a830ec0e1647e72a3d62cae32a24f4..64559e8af14b3e7aa3dad26d0f2dc3e07e1edf2c 100644 (file)
@@ -244,9 +244,17 @@ static int usbhs_get_id(struct platform_device *pdev)
        return gpio_get_value(GPIO_PTB3);
 }
 
+static void usbhs_phy_reset(struct platform_device *pdev)
+{
+       /* enable vbus if HOST */
+       if (!gpio_get_value(GPIO_PTB3))
+               gpio_set_value(GPIO_PTB5, 1);
+}
+
 static struct renesas_usbhs_platform_info usbhs_info = {
        .platform_callback = {
                .get_id         = usbhs_get_id,
+               .phy_reset      = usbhs_phy_reset,
        },
        .driver_param = {
                .buswait_bwait          = 4,