Skip to contentSkip to conversation

phy: qcom: qmp: Use power_on/off ops for PCIe

PATCH Applied Bjorn Andersson 4 participants 4 messages Jan 6, 2020 – Mar 5, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 phy: qcom: qmp: Use power_on/off ops for PCIe

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.

---

Changes since v3:
- Sent separate from SDM845 QMP/QHP series

Changes since v2:
- None

Changes since v1:
- None

 drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp.c +3 -3
index 7db2a94f7a99..e107a7eec235 100644
@@ -1967,7 +1967,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,
@@ -2067,8 +2067,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)) {
Signature · 1 line
2.24.0
maintainer Reviewed-by on v4 1/1
#2 lore raw
In reply to Bjorn Andersson
Quoted 3 lines · Bjorn Andersson

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.

Signature · 1 line
~Vinod
#3 lore raw
Quoted 7 lines · Vinod Koul
Quoted 3 lines · Bjorn Andersson

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.

merged, thanks!

-Kishon