Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1689540

Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name

From Bjorn Andersson <bjorn.andersson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name
Date 2017-07-18 00:40 +0200
Message-ID <u4mQh-2yQ-3@gated-at.bofh.it> (permalink)
References <u4d0B-4Qd-3@gated-at.bofh.it> <u4d0B-4Qd-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 17 Jul 05:03 PDT 2017, Varadarajan Narayanan wrote:

> Presently, the phy pipe clock's name is assumed to be either
> usb3_phy_pipe_clk_src or pcie_XX_pipe_clk_src (where XX is the
> phy lane's number). However, this will not work if an SoC has
> more than one instance of the phy. Hence, instead of assuming
> the name of the clock, fetch it from the DT.
> 

Adding the support to fetch this from DT looks reasonable, but you
should make sure to fall back to the old logic in case you don't find a
"clock-output-names" property.

[..]
> @@ -1110,6 +1103,8 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
>  
>  	id = 0;
>  	for_each_available_child_of_node(dev->of_node, child) {
> +		const char *clk_name;
> +
>  		/* Create per-lane phy */
>  		ret = qcom_qmp_phy_create(dev, child, id);
>  		if (ret) {
> @@ -1118,11 +1113,20 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
>  			return ret;
>  		}
>  
> +		ret = of_property_read_string(child, "clock-output-names",
> +							&clk_name);
> +		if (ret) {

This would be the case for any existing dts files, so you're not allowed
to treat this as an error.

> +			dev_err(dev,
> +				"failed to get clock-output-names for lane%d phy, %d\n",
> +				id, ret);
> +			return ret;
> +		}
> +

Regards,
Bjorn

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name Varadarajan Narayanan <varada@codeaurora.org> - 2017-07-17 14:10 +0200
  Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-07-18 00:40 +0200
    Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name Varadarajan Narayanan <varada@codeaurora.org> - 2017-07-18 11:00 +0200
      Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-07-18 19:00 +0200
        Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-07-19 05:10 +0200
  Re: [PATCH 3/7] phy: qcom-qmp: Fix phy pipe clock name Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-07-19 05:20 +0200

csiph-web