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

Commit b6521d40 authored by Jack Pham's avatar Jack Pham
Browse files

usb: phy: qusb: Don't enable power rails until init() is called



This ensures that if QUSB PHY is probed but not initialized by
any controller that it doesn't needlessly enable any regulators.

Change-Id: I3ec2e9a7f21f1f9c72f9d37c337c087e4967c9a0
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent bf6a4fa8
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -142,10 +142,15 @@ disable_vdd:
static int qusb_phy_init(struct usb_phy *phy)
{
	struct qusb_phy *qphy = container_of(phy, struct qusb_phy, phy);
	int ret;
	u32 t1, t2, t3, t4;

	dev_dbg(phy->dev, "%s\n", __func__);

	ret = qusb_phy_enable_power(qphy, true);
	if (ret)
		return ret;

	if (!qphy->clocks_enabled) {
		clk_prepare_enable(qphy->ref_clk);
		clk_prepare_enable(qphy->cfg_ahb_clk);
@@ -445,10 +450,6 @@ static int qusb_phy_probe(struct platform_device *pdev)
		return PTR_ERR(qphy->vdda18);
	}

	ret = qusb_phy_enable_power(qphy, true);
	if (ret)
		return ret;

	platform_set_drvdata(pdev, qphy);

	qphy->phy.label			= "msm-qusb-phy";