devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yunzhi Li <lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
	heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Cc: olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org,
	huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v6 1/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY
Date: Thu, 11 Dec 2014 21:45:11 +0800	[thread overview]
Message-ID: <54899FE7.7050808@rock-chips.com> (raw)
In-Reply-To: <548971AF.1020506-l0cyMroinI0@public.gmane.org>

Hi Kishon:

On 2014/12/11 18:27, Kishon Vijay Abraham I wrote:
> Hi,
>
> On Thursday 11 December 2014 03:25 PM, Yunzhi Li wrote:
>> +
>> +static struct phy *rockchip_usb_phy_xlate(struct device *dev,
>> +					struct of_phandle_args *args)
>> +{
>> +	struct rockchip_usb_phy_priv *priv = dev_get_drvdata(dev);
>> +	unsigned int phy_id = args->args[0];
>> +
>> +	if (WARN_ON(phy_id < 0 || phy_id >= priv->nphys))
>> +		return ERR_PTR(-ENODEV);
>> +
>> +	return priv->phys[phy_id].phy;
> I didn't mean that. You can get rid of this entire xlate stuff if you use
> something like below
>
> phy@xxx {
> 	compatible = "";
> 	phy1:usb_phy {
> 	}
> 	phy2:usb_phy {
> 	};
> };
>
>
> usb@xx {
> 	compatible = "";
> 	phys = <&phy1>; //doesn't need xlate
> 	/* this needs xlate
> 	   phys = <&phy 1>;
> 	*/
> 	phy-names = "phy";
> };

Thank you so much for your suggestion, but still have a question:
I have to add the #phy-cells property in each phy sub-node, otherwise 
devm_get_phy() will fail and I get log info like
"/usb@ff500000: could not get #phy-cells for /phy/usbp-phy1". So can the 
#phy-cells property defines in patent node
also valid for it's child nodes like #address-cells ?

---
Yunzhi Li @ rockchip


--
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

  parent reply	other threads:[~2014-12-11 13:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11  9:55 [PATCH v6 0/5] Patches to add support for Rockchip usb PHYs Yunzhi Li
2014-12-11  9:55 ` [PATCH v6 1/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Yunzhi Li
2014-12-11 10:27   ` Kishon Vijay Abraham I
     [not found]     ` <548971AF.1020506-l0cyMroinI0@public.gmane.org>
2014-12-11 13:45       ` Yunzhi Li [this message]
2014-12-12  5:34         ` Kishon Vijay Abraham I
2014-12-11 18:41     ` Doug Anderson
2014-12-12  5:47       ` Kishon Vijay Abraham I
2014-12-12  5:51         ` Doug Anderson
2014-12-11 18:09   ` Doug Anderson
2014-12-12  3:05     ` Doug Anderson
2014-12-12  3:43     ` Yunzhi Li
2014-12-11  9:55 ` [PATCH v6 2/5] Documentation: bindings: add dt documentation for Rockchip usb PHY Yunzhi Li
     [not found]   ` <1418291722-25448-3-git-send-email-lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-12-11 18:46     ` Doug Anderson
2014-12-11 18:49       ` Doug Anderson
2014-12-11  9:55 ` [PATCH v6 4/5] ARM: dts: rockchip: add rk3288 " Yunzhi Li
2014-12-11 10:11 ` [PATCH v6 5/5] ARM: dts: rockchip: Enable usb PHY on rk3288-evb board Yunzhi Li

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=54899FE7.7050808@rock-chips.com \
    --to=lyz-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=zyw-TNX95d0MmH7DzftRWevZcw@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).