aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-10-23 22:57:10 -0400
committerFelipe Balbi <balbi@ti.com>2011-12-12 04:44:58 -0500
commitf1ee56a0004c4a5974e7a69665330b6ff818bf92 (patch)
tree9f03d98c0aeb599258bfc963240984ada727a5bb /drivers/usb/renesas_usbhs
parenta49a88f108516fd5ae24e26df5a63beb847807df (diff)
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index b4cf555ce58..17bf1f74377 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[] = {
291 */ 291 */
292static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable) 292static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable)
293{ 293{
294 struct platform_device *pdev = usbhs_priv_to_pdev(priv);
294 struct device *dev = usbhs_priv_to_dev(priv); 295 struct device *dev = usbhs_priv_to_dev(priv);
295 296
296 if (enable) { 297 if (enable) {
297 /* enable PM */ 298 /* enable PM */
298 pm_runtime_get_sync(dev); 299 pm_runtime_get_sync(dev);
299 300
301 /* enable platform power */
302 usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable);
303
300 /* USB on */ 304 /* USB on */
301 usbhs_sys_clock_ctrl(priv, enable); 305 usbhs_sys_clock_ctrl(priv, enable);
302 } else { 306 } else {
303 /* USB off */ 307 /* USB off */
304 usbhs_sys_clock_ctrl(priv, enable); 308 usbhs_sys_clock_ctrl(priv, enable);
305 309
310 /* disable platform power */
311 usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable);
312
306 /* disable PM */ 313 /* disable PM */
307 pm_runtime_put_sync(dev); 314 pm_runtime_put_sync(dev);
308 } 315 }