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

Commit 4ef55a07 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

usb: gadget: ci13xxx: Do not clear USBCMD_SESS_VLD_CTRL on disconnect



Clearing the bit SESS_VLD_CTRL of the USBCMD register on cable
disconnect leads to leakage current in PHY if the USB regulators
are still ON.
Avoid this issue by not clearing the bit on USB cable disconnect.

Change-Id: I67ec52ba95f31d5c108256b248f08a2c8ab60c23
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent bc46a78f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -70,18 +70,11 @@ static void ci13xxx_msm_disconnect(void)
	struct usb_phy *phy = udc->transceiver;

	if (phy && (phy->flags & ENABLE_DP_MANUAL_PULLUP)) {
		u32 temp;

		usb_phy_io_write(phy,
				ULPI_MISC_A_VBUSVLDEXT |
				ULPI_MISC_A_VBUSVLDEXTSEL,
				ULPI_CLR(ULPI_MISC_A));

		/* Notify LINK of VBUS LOW */
		temp = readl_relaxed(USB_USBCMD);
		temp &= ~USBCMD_SESS_VLD_CTRL;
		writel_relaxed(temp, USB_USBCMD);

		/*
		 * Add memory barrier as it is must to complete
		 * above USB PHY and Link register writes before