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 <bjorn.andersson@linaro.org>
(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 <john.stultz@linaro.org>
Change-Id: I90bec4df92abb86984ef617a65d0ed98e8702545
This commit is contained in:
Bjorn Andersson
2019-09-28 20:20:59 -07:00
committed by Alistair Delva
parent b3d104230f
commit 634f2a3376

View File

@@ -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)) {