Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51de303f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: phy: qmp: Add support for SS_PHY LDO clock"

parents a587228d 0aa232e0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ struct msm_ssphy_qmp {
	struct regulator	*vdd;
	struct regulator	*vdda18;
	int			vdd_levels[3]; /* none, low, high */
	struct clk		*ldo_clk;
	struct clk		*aux_clk;
	struct clk		*cfg_ahb_clk;
	struct clk		*pipe_clk;
@@ -698,6 +699,10 @@ static int msm_ssphy_qmp_probe(struct platform_device *pdev)
		goto disable_ss_vdd;
	}

	phy->ldo_clk = devm_clk_get(dev, "ldo_clk");
	if (!IS_ERR(phy->ldo_clk))
		clk_prepare_enable(phy->ldo_clk);

	platform_set_drvdata(pdev, phy);

	if (of_property_read_bool(dev->of_node, "qcom,vbus-valid-override"))
@@ -726,6 +731,8 @@ static int msm_ssphy_qmp_probe(struct platform_device *pdev)
	return 0;

disable_ss_ldo:
	if (!IS_ERR(phy->ldo_clk))
		clk_disable_unprepare(phy->ldo_clk);
	msm_ssusb_qmp_ldo_enable(phy, 0);
disable_ss_vdd:
	regulator_disable(phy->vdd);
@@ -743,6 +750,8 @@ static int msm_ssphy_qmp_remove(struct platform_device *pdev)
		return 0;

	usb_remove_phy(&phy->phy);
	if (!IS_ERR(phy->ldo_clk))
		clk_disable_unprepare(phy->ldo_clk);
	msm_ssusb_qmp_ldo_enable(phy, 0);
	regulator_disable(phy->vdd);
	msm_ssusb_qmp_config_vdd(phy, 0);