From: Kuninori Morimoto Date: Wed, 1 Aug 2012 07:54:58 +0000 (-0700) Subject: sh: ecovec: care CN5 VBUS if USB host mode X-Git-Tag: firefly_0821_release~3680^2~2261^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1ca8fe38a6c958babe6571e39cb0115a40b94603;p=firefly-linux-kernel-4.4.55.git sh: ecovec: care CN5 VBUS if USB host mode renesas_usbhs driver can control both USB Host/Gadget, but it needs VBUS output if Host mode. Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index a06c5c8a14a8..64559e8af14b 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -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,