Skip to content

Commit abe87c1

Browse files
shimodaygregkh
authored andcommitted
usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL
commit 59a0879 upstream. This patch fixes an issue that some registers may be not initialized after resume if the USBHSF_RUNTIME_PWCTRL is not set. Otherwise, if a cable is not connected, the driver will not enable INTENB0.VBSE after resume. And then, the driver cannot detect the VBUS. Fixes: ca8a282 ("usb: gadget: renesas_usbhs: add suspend/resume support") Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ff651e8 commit abe87c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/renesas_usbhs/common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,10 @@ static int usbhsc_resume(struct device *dev)
733733
struct usbhs_priv *priv = dev_get_drvdata(dev);
734734
struct platform_device *pdev = usbhs_priv_to_pdev(priv);
735735

736-
if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL))
736+
if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) {
737737
usbhsc_power_ctrl(priv, 1);
738+
usbhs_mod_autonomy_mode(priv);
739+
}
738740

739741
usbhs_platform_call(priv, phy_reset, pdev);
740742

0 commit comments

Comments
 (0)