Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467398

Re: [PATCH] usb: chipidea: support generic phy in PM code path

From Jisheng Zhang <jszhang@marvell.com>
Newsgroups linux.kernel
Subject Re: [PATCH] usb: chipidea: support generic phy in PM code path
Date 2016-08-22 08:50 +0200
Message-ID <s8Rdw-2H5-19@gated-at.bofh.it> (permalink)
References <s7QWd-5wf-19@gated-at.bofh.it> <s8Qhr-28D-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Peter,

On Mon, 22 Aug 2016 13:33:08 +0800 Peter Chen wrote:

> On Fri, Aug 19, 2016 at 08:10:13PM +0800, Jisheng Zhang wrote:
> > Support generic phy in PM code path: call phy_power_off/phy_power_on
> > in ci_controller_suspend/ci_controller_resume.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> > ---
> >  drivers/usb/chipidea/core.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> > index ae12595..ef9fb0b 100644
> > --- a/drivers/usb/chipidea/core.c
> > +++ b/drivers/usb/chipidea/core.c
> > @@ -1116,6 +1116,7 @@ static void ci_controller_suspend(struct ci_hdrc *ci)
> >  		usleep_range(ci->platdata->phy_clkgate_delay_us,
> >  			     ci->platdata->phy_clkgate_delay_us + 50);
> >  	usb_phy_set_suspend(ci->usb_phy, 1);
> > +	phy_power_off(ci->phy);  
> 
> How could you support USB wakeup after PHY is powered off?

Per my understanding, the PHY's power off just power off data communication part
but leaves the circuits involved in wakeup detection active.

Thanks,
Jisheng

> 
> Peter
> 
> >  	ci->in_lpm = true;
> >  	enable_irq(ci->irq);
> >  }
> > @@ -1132,9 +1133,10 @@ static int ci_controller_resume(struct device *dev)
> >  	}
> >  
> >  	ci_hdrc_enter_lpm(ci, false);
> > -	if (ci->usb_phy) {
> > +	if (ci->usb_phy || ci->phy) {
> >  		usb_phy_set_suspend(ci->usb_phy, 0);
> >  		usb_phy_set_wakeup(ci->usb_phy, false);
> > +		phy_power_on(ci->phy);
> >  		hw_wait_phy_stable();
> >  	}
> >  
> > -- 
> > 2.9.3
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html  
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] usb: chipidea: support generic phy in PM code path Jisheng Zhang <jszhang@marvell.com> - 2016-08-19 14:20 +0200
  Re: [PATCH] usb: chipidea: support generic phy in PM code path Peter Chen <hzpeterchen@gmail.com> - 2016-08-22 07:50 +0200
    Re: [PATCH] usb: chipidea: support generic phy in PM code path Jisheng Zhang <jszhang@marvell.com> - 2016-08-22 08:50 +0200
      Re: [PATCH] usb: chipidea: support generic phy in PM code path Peter Chen <hzpeterchen@gmail.com> - 2016-08-22 09:40 +0200
        Re: [PATCH] usb: chipidea: support generic phy in PM code path Jisheng Zhang <jszhang@marvell.com> - 2016-08-22 10:20 +0200
          Re: [PATCH] usb: chipidea: support generic phy in PM code path Kishon Vijay Abraham I <kishon@ti.com> - 2016-08-22 10:30 +0200
            Re: [PATCH] usb: chipidea: support generic phy in PM code path Jisheng Zhang <jszhang@marvell.com> - 2016-08-22 10:40 +0200

csiph-web