lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Dec 2014 11:04:53 +0530
From:	Kishon Vijay Abraham I <kishon@...com>
To:	Yunzhi Li <lyz@...k-chips.com>, <heiko@...ech.de>,
	<jwerner@...omium.org>, <dianders@...omium.org>
CC:	<olof@...om.net>, <huangtao@...k-chips.com>, <zyw@...k-chips.com>,
	<cf@...k-chips.com>, <linux-rockchip@...ts.infradead.org>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<devicetree@...r.kernel.org>
Subject: Re: [PATCH v6 1/5] phy: add a driver for the Rockchip SoC internal
 USB2.0 PHY

Hi,

On Thursday 11 December 2014 07:15 PM, Yunzhi Li wrote:
> 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@...00000: 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 ?

No. You have to add #phy-cells property for every PHY node.

Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ