From: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Jiancheng Xue
<xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Jianguo Sun <sunjianguo1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] phy: add combo phy driver for HiSilicon STB SoCs
Date: Mon, 23 Oct 2017 09:55:06 +0800 [thread overview]
Message-ID: <20171023015504.GG8700@dragon> (raw)
In-Reply-To: <066fef03-7c21-fe7c-218a-fdec446500da-l0cyMroinI0@public.gmane.org>
Hi Kishon,
Thanks for taking time to review the patch.
This combo phy support PCIe and USB3 on HiSilicon STB SoC. We will
address all your comments and add USB3 support in the new version.
On Wed, Oct 18, 2017 at 06:13:31PM +0530, Kishon Vijay Abraham I wrote:
> > diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
> > index 3a52dcb09566..11754b293fb4 100644
> > --- a/drivers/phy/Makefile
> > +++ b/drivers/phy/Makefile
> > @@ -6,6 +6,7 @@ obj-$(CONFIG_GENERIC_PHY) += phy-core.o
> > obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o
> > obj-$(CONFIG_PHY_XGENE) += phy-xgene.o
> > obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o
> > +
>
> spurious blank space..
Left from rebasing the change to latest kernel. Fixed. Thanks.
> > obj-$(CONFIG_ARCH_SUNXI) += allwinner/
> > obj-$(CONFIG_ARCH_MESON) += amlogic/
> > obj-$(CONFIG_LANTIQ) += lantiq/
<snip>
> > +static struct phy *histb_combphy_xlate(struct device *dev,
> > + struct of_phandle_args *args)
> > +{
> > + struct histb_combphy_priv *priv = dev_get_drvdata(dev);
> > +
> > + if (args->args_count < 1) {
> > + dev_err(dev, "DT did not pass correct no of args\n");
> > + return ERR_PTR(-ENODEV);
> > + }
> > +
> > + priv->mode = args->args[0];
> > +
> > + if (priv->mode > COMBPHY_MODE_SATA) {
>
> this should use generic bindings from include/dt-bindings/phy/phy.h.
Great. Thanks for the info. Will use it.
> > + dev_err(dev, "DT did not pass correct phy mode\n");
> > + return ERR_PTR(-ENODEV);
> > + }
> > +
> > + return priv->phy;
> > +}
<snip>
> > + phy_provider = devm_of_phy_provider_register(dev, histb_combphy_xlate);
> > + if (IS_ERR(phy_provider)) {
> > + dev_err(dev, "failed to register phy provider\n");
> > + return PTR_ERR(phy_provider);
> > + }
> > +
> > + return 0;
>
> return PTR_ERR_OR_ZERO(phy_provider) instead?
Yes. Thanks for the suggestion.
Shawn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-10-23 1:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-15 4:48 [PATCH] phy: add combo phy driver for HiSilicon STB SoCs Shawn Guo
[not found] ` <1508042882-20922-1-git-send-email-shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-18 12:43 ` Kishon Vijay Abraham I
[not found] ` <066fef03-7c21-fe7c-218a-fdec446500da-l0cyMroinI0@public.gmane.org>
2017-10-23 1:55 ` Shawn Guo [this message]
2017-10-23 22:28 ` Rob Herring
2017-10-24 6:41 ` Shawn Guo
2017-10-24 15:12 ` Shawn Guo
2017-10-25 13:34 ` Rob Herring
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=20171023015504.GG8700@dragon \
--to=shawnguo-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=sunjianguo1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).