Re: [PATCH] usb: dwc3: turn off VBUS when leaving host mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bin,

On 13/11/2019 16:15, Bin Liu wrote:
VBUS should be turned off when leaving the host mode.
Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to
turn off VBUS power.

Doesn't DRVVBUS pin de-assert when root hub driver turns off port power?
Which should happen when XHCI host driver is unregistered as part of
dwc3_host_exit()?

cheers,
-roger


Fixes: 5f94adfeed97 ("usb: dwc3: core: refactor mode initialization to its own function")
Signed-off-by: Bin Liu <b-liu@xxxxxx>
---
  drivers/usb/dwc3/core.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 97d6ae3c4df2..76ac9cd54e64 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1201,6 +1201,7 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
  		break;
  	case USB_DR_MODE_HOST:
  		dwc3_host_exit(dwc);
+		dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE);
  		break;
  	case USB_DR_MODE_OTG:
  		dwc3_drd_exit(dwc);


--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux