diff mbox series

[v4] phy: qcom: qmp: Use power_on/off ops for PCIe

Message ID 20200106081142.3192204-1-bjorn.andersson@linaro.org (mailing list archive)
State Accepted
Commit cc1e06f033af66202f4018e823c446f40fbc4a51
Headers show
Series [v4] phy: qcom: qmp: Use power_on/off ops for PCIe | expand

Commit Message

Bjorn Andersson Jan. 6, 2020, 8:11 a.m. UTC
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>
---

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(-)

Comments

John Stultz Feb. 21, 2020, 6:17 a.m. UTC | #1
On Mon, Jan 6, 2020 at 12:12 AM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> 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>

For what its worth:
Reviewed-by: John Stultz <john.stultz@linaro.org>

thanks
-john
Vinod Koul Feb. 21, 2020, 2:09 p.m. UTC | #2
On 06-01-20, 00:11, Bjorn Andersson wrote:
> 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 <vkoul@kernel.org>
Kishon Vijay Abraham I March 5, 2020, 11:26 a.m. UTC | #3
On 21/02/20 7:39 pm, Vinod Koul wrote:
> On 06-01-20, 00:11, Bjorn Andersson wrote:
>> 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 <vkoul@kernel.org>
> 
merged, thanks!

-Kishon
diff mbox series

Patch

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 7db2a94f7a99..e107a7eec235 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -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)) {