All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: [PATCH v3 3/5] phy: qcom: qmp: Use power_on/off ops for PCIe
Date: Wed,  6 Nov 2019 16:09:15 -0800	[thread overview]
Message-ID: <20191107000917.1092409-4-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20191107000917.1092409-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 v2:
- None

 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


  parent reply	other threads:[~2019-11-07  0:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  0:09 [PATCH v3 0/5] phy: qcom-qmp: Add SDM845 QMP and QHP PHYs Bjorn Andersson
2019-11-07  0:09 ` [PATCH v3 1/5] dt-bindings: phy-qcom-qmp: Add SDM845 PCIe to binding Bjorn Andersson
2019-11-07  0:09 ` [PATCH v3 2/5] phy: qcom-qmp: Increase PHY ready timeout Bjorn Andersson
2019-12-10 18:47   ` Evan Green
2019-12-10 19:11     ` Bjorn Andersson
2019-11-07  0:09 ` Bjorn Andersson [this message]
2019-11-07  0:09 ` [PATCH v3 4/5] phy: qcom: qmp: Add SDM845 PCIe QMP PHY support Bjorn Andersson
2019-11-07  0:09 ` [PATCH v3 5/5] phy: qcom: qmp: Add SDM845 QHP PCIe PHY Bjorn Andersson
2019-11-07 15:20 ` [PATCH v3 0/5] phy: qcom-qmp: Add SDM845 QMP and QHP PHYs Julien Massot
2019-12-27  3:24 ` 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=20191107000917.1092409-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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.