From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: kishon <kishon@ti.com>, robh+dt <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 2/2] phy: qcom-qmp: new qmp phy driver for qcom-chipsets
Date: Wed, 2 Nov 2016 09:33:41 +0000 [thread overview]
Message-ID: <b9cc6c7a-0819-fa6a-d4f9-b057dddda5bb@linaro.org> (raw)
In-Reply-To: <CAFp+6iG=3QRU+Ffj+8xJaPrpy0p7TyjeX0khiOGQMtz-z-hiSg@mail.gmail.com>
On 02/11/16 07:26, Vivek Gautam wrote:
>>> + phy_desc->tx = base + qphy->cfg->tx_offsets[id];
>>> >> + phy_desc->rx = base + qphy->cfg->rx_offsets[id];
>>> >> + phy_desc->pcs = base + qphy->cfg->pcs_offsets[id];
>>> >> +
>>> >> + /*
>>> >> + * Get PHY's Pipe clock, if any; USB3 and PCIe are PIPE
>>> >> + * based phys, so they essentially have pipe clock
>>> >> + */
>>> >> + memset(&prop_name, 0, sizeof(prop_name));
>>> >> + snprintf(prop_name, MAX_PROP_NAME, "pipe%d", id);
>>> >> + phy_desc->pipe_clk = devm_clk_get(dev, prop_name);
>>> >> + if (IS_ERR(phy_desc->pipe_clk)) {
>>> >> + if (qphy->cfg->type == PHY_TYPE_PCIE ||
>>> >> + qphy->cfg->type == PHY_TYPE_USB3) {
>>> >> + ret = PTR_ERR(phy_desc->pipe_clk);
>>> >> + if (ret != -EPROBE_DEFER)
>>> >> + dev_err(dev,
>>> >> + "failed to get lane%d pipe_clk\n",
>>> >> id);
>>> >> + return ret;
>>> >> + } else {
>>> >> + phy_desc->pipe_clk = NULL;
>>> >> + }
>>> >> + }
>> >
>> >
>> > Do we need to really need phy type for this?
>> > You should proably make a flag in cfg to mark this rather then using phy
>> > type. Hopefully it will also simplify the logic.
> The pipe clock is something that's specific to PCIe and USB3 type
> phys (both are PIPE3 specs based phys). So i think it is okay
> to use the PHY_TYPE_{*} macros here. Looks a bit cleaner rather
> than having a cfg flag. No ?
Yes, it makes sense, I was not sure of full details of the pipe3 specs,
now that you made it more clear.
Remember to add this in comments.
Thanks,
srini
>
> Using PHY_TYPE_{*} macros will also keep the doors open to
> other PHY types that are added at a later point in time.
>
>> >
next prev parent reply other threads:[~2016-11-02 9:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 10:43 [PATCH 0/2] phy: USB and PCIe phy drivers for Qcom chipsets Vivek Gautam
2016-10-19 10:43 ` [PATCH 1/2] phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips Vivek Gautam
2016-10-20 4:13 ` Vivek Gautam
2016-10-26 19:56 ` Kishon Vijay Abraham I
2016-11-02 8:59 ` Vivek Gautam
2016-10-26 21:16 ` Rob Herring
2016-11-02 8:11 ` Vivek Gautam
2016-10-19 10:43 ` [PATCH 2/2] phy: qcom-qmp: new qmp phy driver for qcom-chipsets Vivek Gautam
2016-10-19 10:54 ` Vivek Gautam
2016-10-20 4:17 ` Vivek Gautam
2016-10-26 20:11 ` Kishon Vijay Abraham I
[not found] ` <ca4054a8-a813-0f50-3224-1e418eaa7095-l0cyMroinI0@public.gmane.org>
2016-11-10 9:03 ` Vivek Gautam
[not found] ` <CAFp+6iGMp9pkt5NVTG9f-xjF5VOmj3Om5ngvMboyjdcR94Bhag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-22 7:47 ` Vivek Gautam
2016-11-22 9:09 ` Kishon Vijay Abraham I
[not found] ` <1476873827-7191-3-git-send-email-vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-10-26 13:57 ` Srinivas Kandagatla
[not found] ` <a969a6be-472d-a463-790b-1e2f373d19b2-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-02 7:26 ` Vivek Gautam
2016-11-02 9:33 ` Srinivas Kandagatla [this message]
2016-10-26 21:18 ` Rob Herring
2016-11-02 7:27 ` Vivek Gautam
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=b9cc6c7a-0819-fa6a-d4f9-b057dddda5bb@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=vivek.gautam@codeaurora.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).