From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Chen Subject: Re: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy management Date: Fri, 8 Jul 2016 17:25:35 +0800 Message-ID: <20160708092535.GD20485@shlinux2> References: <20160707222114.1673-1-stephen.boyd@linaro.org> <20160707222114.1673-7-stephen.boyd@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:34326 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754325AbcGHJdG (ORCPT ); Fri, 8 Jul 2016 05:33:06 -0400 Content-Disposition: inline In-Reply-To: <20160707222114.1673-7-stephen.boyd@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Stephen Boyd Cc: linux-usb@vger.kernel.org, Felipe Balbi , Arnd Bergmann , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Peter Chen , Greg Kroah-Hartman , Andy Gross , linux-arm-kernel@lists.infradead.org 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 > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > 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? -- Best Regards, Peter Chen