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

Commit 4e161104 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: phy: Skip phy init when eud is connected



Currently phy driver us initializing phy irrespective
of eud connected or not. But driver shouldn't re-init
the phy if eud is connected since it can break eud
functionality once driver powerdown the phy and perform
re-initialization. Prevent this by bailing out early from
phy_init if eud_connected is set to true.

Change-Id: Ie436f8f97cf1f630e9d7ebe028a24812635b2d1f
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 8215452a
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -425,6 +425,19 @@ static int qusb_phy_init(struct usb_phy *phy)
	u8 reg;
	bool pll_lock_fail = false;

	/*
	 * If eud is enabled eud_connected parameter will be set to true.
	 * Phy init will be called when spoof attach is done but it will
	 * break the eud functionality by powering down the phy and
	 * re-initializing it. Hence, bail out early from phy init when
	 * eud_connected param is set to true.
	 */
	if (eud_connected) {
		pr_debug("eud_connected is true so bailing out early from %s\n",
				__func__);
		return 0;
	}

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

	/*