Skip to content

Commit

Permalink
sh: ecovec: care CN5 VBUS if USB host mode
Browse files Browse the repository at this point in the history
renesas_usbhs driver can control both USB Host/Gadget,
but it needs VBUS output if Host mode.

Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Paul Mundt <[email protected]>
  • Loading branch information
morimoto authored and pmundt committed Aug 1, 2012
1 parent 8a87776 commit 1ca8fe3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1ca8fe3

Please sign in to comment.