From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: [PATCH v2 3/5] phy: qcom: qmp: Use power_on/off ops for PCIe
Date: Fri, 1 Nov 2019 17:16:26 -0700 [thread overview]
Message-ID: <20191102001628.4090861-4-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20191102001628.4090861-1-bjorn.andersson@linaro.org>
The PCIe PHY initialization requires the attached device to be present,
which is primarily achieved by the PCI controller driver. So move the
logic from init/exit to power_on/power_off.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Changes since v1:
- New patch
drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 66f91726b8b2..b9f849d86795 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -1968,7 +1968,7 @@ static const struct phy_ops qcom_qmp_phy_gen_ops = {
.owner = THIS_MODULE,
};
-static const struct phy_ops qcom_qmp_ufs_ops = {
+static const struct phy_ops qcom_qmp_pcie_ufs_ops = {
.power_on = qcom_qmp_phy_enable,
.power_off = qcom_qmp_phy_disable,
.set_mode = qcom_qmp_phy_set_mode,
@@ -2068,8 +2068,8 @@ int qcom_qmp_phy_create(struct device *dev, struct device_node *np, int id)
}
}
- if (qmp->cfg->type == PHY_TYPE_UFS)
- ops = &qcom_qmp_ufs_ops;
+ if (qmp->cfg->type == PHY_TYPE_UFS || qmp->cfg->type == PHY_TYPE_PCIE)
+ ops = &qcom_qmp_pcie_ufs_ops;
generic_phy = devm_phy_create(dev, np, ops);
if (IS_ERR(generic_phy)) {
--
2.23.0
next prev parent reply other threads:[~2019-11-02 0:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-02 0:16 [PATCH v2 0/5] phy: qcom-qmp: Add SDM845 QMP and QHP PHYs Bjorn Andersson
2019-11-02 0:16 ` [PATCH v2 1/5] dt-bindings: phy-qcom-qmp: Add SDM845 PCIe to binding Bjorn Andersson
2019-11-05 22:41 ` Rob Herring
2019-11-02 0:16 ` [PATCH v2 2/5] phy: qcom-qmp: Increase PHY ready timeout Bjorn Andersson
2019-11-02 0:16 ` Bjorn Andersson [this message]
2019-11-02 0:16 ` [PATCH v2 4/5] phy: qcom: qmp: Add SDM845 PCIe QMP PHY support Bjorn Andersson
2019-11-02 0:16 ` [PATCH v2 5/5] phy: qcom: qmp: Add SDM845 QHP PCIe PHY Bjorn Andersson
2019-11-03 8:21 ` Vinod Koul
2019-11-04 4:47 ` Bjorn Andersson
2019-11-04 9:22 ` Vinod Koul
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=20191102001628.4090861-4-bjorn.andersson@linaro.org \
--to=bjorn.andersson@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 \
/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).