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


Groups > linux.kernel > #1457361

Re: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy management

From Peter Chen <hzpeterchen@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy management
Date 2016-08-06 23:10 +0200
Message-ID <s3h0Z-2zz-11@gated-at.bofh.it> (permalink)
References <rSpXX-4yB-3@gated-at.bofh.it> <rSpXX-4yB-21@gated-at.bofh.it> <rSAqn-2Tv-43@gated-at.bofh.it> <s3h0Z-2zz-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 05, 2016 at 02:46:00PM -0700, Stephen Boyd wrote:
> Quoting Peter Chen (2016-07-08 02:25:35)
> > On Thu, Jul 07, 2016 at 03:20:57PM -0700, Stephen Boyd wrote:
> > > The ULPI phy on qcom platforms needs to be initialized and
> > > powered on after a USB reset and before we toggle the run/stop
> > > bit. Otherwise, the phy locks up and doesn't work properly.
> > > Therefore, add a flag to skip any phy power management in the
> > > core layer, leaving it up to the glue driver to manage.
> > > 
> > > Cc: Peter Chen <peter.chen@nxp.com>
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> > > ---
> > >  drivers/usb/chipidea/core.c  | 6 ++++++
> > >  include/linux/usb/chipidea.h | 1 +
> > >  2 files changed, 7 insertions(+)
> > > 
> > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> > > index 01390e02ee53..532085a096d9 100644
> > > --- a/drivers/usb/chipidea/core.c
> > > +++ b/drivers/usb/chipidea/core.c
> > > @@ -361,6 +361,9 @@ static int _ci_usb_phy_init(struct ci_hdrc *ci)
> > >   */
> > >  static void ci_usb_phy_exit(struct ci_hdrc *ci)
> > >  {
> > > +     if (ci->platdata->flags & CI_HDRC_OVERRIDE_PHY_CONTROL)
> > > +             return;
> > > +
> > >       if (ci->phy) {
> > >               phy_power_off(ci->phy);
> > >               phy_exit(ci->phy);
> > > @@ -379,6 +382,9 @@ static int ci_usb_phy_init(struct ci_hdrc *ci)
> > >  {
> > >       int ret;
> > >  
> > > +     if (ci->platdata->flags & CI_HDRC_OVERRIDE_PHY_CONTROL)
> > > +             return 0;
> > > +
> > 
> > How you handle the code for PHY getting at probe?
> > 
> 
> Which probe? Glue layer probe? In my case I'm not using the phy until
> the RESET/STOPPED event so I just rely on the chipidea core to get the
> phy and then control the phy manually in the glue layer.

I have no idea about it after reading your patch 10/22.

-- 

Best Regards,
Peter Chen

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


Thread

Re: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper  phy management Peter Chen <hzpeterchen@gmail.com> - 2016-08-06 23:10 +0200
  RE: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy  management Peter Chen <peter.chen@nxp.com> - 2016-08-09 11:20 +0200

csiph-web