LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
To: Yunzhi Li <lyz@rock-chips.com>,
	"heiko@sntech.de" <heiko@sntech.de>,
	"dianders@chromium.org" <dianders@chromium.org>
Cc: "olof@lixom.net" <olof@lixom.net>,
	"huangtao@rock-chips.com" <huangtao@rock-chips.com>,
	"ulrich.prinz@googlemail.com" <ulrich.prinz@googlemail.com>,
	"zyw@rock-chips.com" <zyw@rock-chips.com>,
	"cf@rock-chips.com" <cf@rock-chips.com>,
	"linux-rockchip@lists.infradead.org" 
	<linux-rockchip@lists.infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 3/5] usb: dwc2: Add generic PHY framework support for dwc2 usb controler platform driver.
Date: Mon, 8 Dec 2014 19:46:51 +0000	[thread overview]
Message-ID: <A2CA0424C0A6F04399FB9E1CD98E030484500279@US01WEMBX2.internal.synopsys.com> (raw)
In-Reply-To: <548521D1.2060509@rock-chips.com>

> From: Yunzhi Li [mailto:lyz@rock-chips.com]
> Sent: Sunday, December 07, 2014 7:58 PM
> 
> On 2014/12/6 3:04, Paul Zimmerman wrote:
> >> From: Yunzhi Li [mailto:lyz@rock-chips.com]
> >> Sent: Friday, December 05, 2014 4:52 AM
> >>
> >> Get PHY parameters from devicetree and power off usb PHY during
> >> system suspend.
> >>
> >> Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
> >> ---
> >>
> >>   drivers/usb/dwc2/gadget.c   | 33 ++++++++++++---------------------
> >>   drivers/usb/dwc2/platform.c | 34 ++++++++++++++++++++++++++++++++++
> >>   2 files changed, 46 insertions(+), 21 deletions(-)
> >>
> >> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> >> index 200168e..2601c61 100644
> >> --- a/drivers/usb/dwc2/gadget.c
> >> +++ b/drivers/usb/dwc2/gadget.c
> >> [...]
> >>
> >>   	/*
> >> -	 * Attempt to find a generic PHY, then look for an old style
> >> -	 * USB PHY, finally fall back to pdata
> >> +	 * If platform probe couldn't find a generic PHY or an old style
> >> +	 * USB PHY, fall back to pdata
> >>   	 */
> >> -	phy = devm_phy_get(dev, "usb2-phy");
> >> -	if (IS_ERR(phy)) {
> >> -		uphy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> >> -		if (IS_ERR(uphy)) {
> >> -			/* Fallback for pdata */
> >> -			plat = dev_get_platdata(dev);
> >> -			if (!plat) {
> >> -				dev_err(dev,
> >> -				"no platform data or transceiver defined\n");
> >> -				return -EPROBE_DEFER;
> >> -			}
> >> -			hsotg->plat = plat;
> >> -		} else
> >> -			hsotg->uphy = uphy;
> >> -	} else {
> >> -		hsotg->phy = phy;
> >> +	if (IS_ERR_OR_NULL(hsotg->phy) && IS_ERR_OR_NULL(hsotg->uphy)) {
> >> +		plat = dev_get_platdata(dev);
> >> +		if (!plat) {
> >> +			dev_err(dev,
> >> +			"no platform data or transceiver defined\n");
> >> +			return -EPROBE_DEFER;
> >> +		}
> >> +		hsotg->plat = plat;
> >> +	} else if (hsotg->phy) {
> > You have changed the behavior here. Previously, the driver would work
> > even if there were no phys or pdata defined. Now it will return
> > -EPROBE_DEFER instead. Are you sure that won't break any existing
> > platforms?
> >
> I don't really catch your meaning. Could you please point out where is
> the difference? Thanks .

Yeah, sorry, I misread the patch. I think your new version is fine.

-- 
Paul


  reply	other threads:[~2014-12-08 19:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-05 12:52 [PATCH v2 0/5] Yunzhi Li
2014-12-05 12:52 ` [PATCH v2 1/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Yunzhi Li
2014-12-05 13:38   ` Romain Perier
2014-12-08  4:12     ` Yunzhi Li
2014-12-05 12:52 ` [PATCH v2 2/5] Documentation: bindings: add doc for the Rockchip usb PHY Yunzhi Li
2014-12-05 12:52 ` [PATCH v2 3/5] usb: dwc2: Add generic PHY framework support for dwc2 usb controler platform driver Yunzhi Li
2014-12-05 19:04   ` Paul Zimmerman
2014-12-08  3:58     ` Yunzhi Li
2014-12-08 19:46       ` Paul Zimmerman [this message]
2014-12-05 12:52 ` [PATCH v2 4/5] ARM: dts: add rk3288 usb PHY Yunzhi Li
2014-12-05 13:47   ` Romain Perier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A2CA0424C0A6F04399FB9E1CD98E030484500279@US01WEMBX2.internal.synopsys.com \
    --to=paul.zimmerman@synopsys.com \
    --cc=cf@rock-chips.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lyz@rock-chips.com \
    --cc=olof@lixom.net \
    --cc=ulrich.prinz@googlemail.com \
    --cc=zyw@rock-chips.com \
    --subject='RE: [PATCH v2 3/5] usb: dwc2: Add generic PHY framework support for dwc2 usb controler platform driver.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).