From 634f2a33769e7dba512a5d8d52153bb8f93262a2 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sat, 28 Sep 2019 20:20:59 -0700 Subject: [PATCH] ANDROID: phy: qcom: qmp: Use power_on/off ops for PCIe The PCIe PHY needs to be initialized as part of the PCI initialization and should therefore implement the power_on/power_off ops, rather than init/exit. Bug: 146449535 Signed-off-by: Bjorn Andersson (cherry picked from commit 49020f887a7ee8da2271e0e3f3eeb83925f80fb8 https://git.linaro.org/landing-teams/working/qualcomm/kernel.git qclt/integration-linux-qcomlt - An unstable rebased branch) Signed-off-by: John Stultz Change-Id: I90bec4df92abb86984ef617a65d0ed98e8702545 --- 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)) {