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

Commit 7e86f427 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: phy: Add module parameter for eud connected case"

parents 1b3aae74 ef3c7d92
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -117,6 +117,9 @@ static unsigned int tune5;
module_param(tune5, uint, 0644);
MODULE_PARM_DESC(tune5, "QUSB PHY TUNE5");

static bool eud_connected;
module_param(eud_connected, bool, 0644);
MODULE_PARM_DESC(eud_connected, "EUD_CONNECTED");

struct qusb_phy {
	struct usb_phy		phy;
@@ -704,6 +707,7 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
			writel_relaxed(0x00,
				qphy->base + QUSB2PHY_PORT_INTR_CTRL);

			if (!eud_connected) {
				/* Disable PHY */
				writel_relaxed(POWER_DOWN |
					readl_relaxed(qphy->base +
@@ -712,10 +716,12 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
				/* Make sure that above write is completed */
				wmb();

			qusb_phy_enable_clocks(qphy, false);
				if (qphy->tcsr_clamp_dig_n)
					writel_relaxed(0x0,
						qphy->tcsr_clamp_dig_n);
			}

			qusb_phy_enable_clocks(qphy, false);
			/* Do not disable power rails if there is vote for it */
			if (!qphy->dpdm_enable)
				qusb_phy_enable_power(qphy, false);