Commit ce1972e5 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Check for set_suspend and set_resume functions

Check for set_suspend and set_resume functions
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7622c363
......@@ -254,13 +254,16 @@ int musb_platform_suspend(struct musb *musb)
OTG_FORCESTDBY_REG |= ENABLEFORCE; /* enable MSTANDBY */
OTG_SYSCONFIG_REG |= AUTOIDLE; /* enable auto idle */
musb->xceiv.set_suspend(&musb->xceiv, 1);
if (musb->xceiv.set_suspend)
musb->xceiv.set_suspend(&musb->xceiv, 1);
return 0;
}
int musb_platform_resume(struct musb *musb)
{
musb->xceiv.set_suspend(&musb->xceiv, 0);
if (musb->xceiv.set_suspend)
musb->xceiv.set_suspend(&musb->xceiv, 0);
OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */
OTG_SYSCONFIG_REG |= SMARTSTDBY; /* enable smart standby */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment