diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-23 19:57:10 -0700 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 11:44:58 +0200 |
commit | f1ee56a0004c4a5974e7a69665330b6ff818bf92 (patch) | |
tree | 9f03d98c0aeb599258bfc963240984ada727a5bb /drivers/usb/renesas_usbhs | |
parent | a49a88f108516fd5ae24e26df5a63beb847807df (diff) | |
download | blackbird-op-linux-f1ee56a0004c4a5974e7a69665330b6ff818bf92.tar.gz blackbird-op-linux-f1ee56a0004c4a5974e7a69665330b6ff818bf92.zip |
usb: gadget: renesas_usbhs: add platform power control function
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index b4cf555ce58e..17bf1f74377a 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -291,18 +291,25 @@ static u32 usbhsc_default_pipe_type[] = { */ static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable) { + struct platform_device *pdev = usbhs_priv_to_pdev(priv); struct device *dev = usbhs_priv_to_dev(priv); if (enable) { /* enable PM */ pm_runtime_get_sync(dev); + /* enable platform power */ + usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); + /* USB on */ usbhs_sys_clock_ctrl(priv, enable); } else { /* USB off */ usbhs_sys_clock_ctrl(priv, enable); + /* disable platform power */ + usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); + /* disable PM */ pm_runtime_put_sync(dev); } |