mirror of https://gitee.com/openkylin/linux.git
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. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
parent
6861781a80
commit
cc1e06f033
|
@ -2377,7 +2377,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,
|
||||
|
@ -2477,8 +2477,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)) {
|
||||
|
|
Loading…
Reference in New Issue