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

Commit dfff903d authored by Sriharsha Allenki's avatar Sriharsha Allenki Committed by Gerrit - the friendly Code Review server
Browse files

usb: qusb: Keep regulators on in probe if EUD is enabled



EUD may be enabled in boot loader and to keep EUD session
alive across kernel boot till USB phy driver is initialized
based on cable status, keep regulators on from USB high speed
phy driver's probe. Regulators shall get turn off while
handling USB cable disconnect routine for both boot up with
and without USB cable case.

Change-Id: I7ebdc0237d7db3e45b61a57264a5564bfa01ed1c
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
parent 4cc94c33
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1706,6 +1706,14 @@ static int qusb_phy_probe(struct platform_device *pdev)

	qphy->suspended = true;

	/*
	 * EUD may be enable in boot loader and to keep EUD session alive across
	 * kernel boot till USB phy driver is initialized based on cable status,
	 * keep LDOs on here.
	 */
	if (qphy->eud_enable_reg && readl_relaxed(qphy->eud_enable_reg))
		qusb_phy_enable_power(qphy, true);

	if (of_property_read_bool(dev->of_node, "extcon")) {
		qphy->id_state = true;
		qphy->vbus_active = false;