phy: qcom: qmp: Use power_on/off ops for PCIe
Subsystems (2)
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
@@ -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
Quoted 6 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.
Signed-off-by Bjorn Andersson <[email protected]>
For what its worth:
thanks
-john
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
Kishon Vijay Abraham I
AppliedQuoted 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.
Reviewed-by Vinod Koul <[email protected]>
merged, thanks!
-Kishon