]>
Commit | Line | Data |
---|---|---|
551c296c GKH |
1 | From 59a0879a0e17b2e43ecdc5e3299da85b8410d7ce Mon Sep 17 00:00:00 2001 |
2 | From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
3 | Date: Wed, 19 Jul 2017 16:16:54 +0900 | |
4 | Subject: usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL | |
5 | ||
6 | From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
7 | ||
8 | commit 59a0879a0e17b2e43ecdc5e3299da85b8410d7ce upstream. | |
9 | ||
10 | This patch fixes an issue that some registers may be not initialized | |
11 | after resume if the USBHSF_RUNTIME_PWCTRL is not set. Otherwise, | |
12 | if a cable is not connected, the driver will not enable INTENB0.VBSE | |
13 | after resume. And then, the driver cannot detect the VBUS. | |
14 | ||
15 | Fixes: ca8a282a5373 ("usb: gadget: renesas_usbhs: add suspend/resume support") | |
16 | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
17 | Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/usb/renesas_usbhs/common.c | 4 +++- | |
22 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
23 | ||
24 | --- a/drivers/usb/renesas_usbhs/common.c | |
25 | +++ b/drivers/usb/renesas_usbhs/common.c | |
26 | @@ -752,8 +752,10 @@ static int usbhsc_resume(struct device * | |
27 | struct usbhs_priv *priv = dev_get_drvdata(dev); | |
28 | struct platform_device *pdev = usbhs_priv_to_pdev(priv); | |
29 | ||
30 | - if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) | |
31 | + if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) { | |
32 | usbhsc_power_ctrl(priv, 1); | |
33 | + usbhs_mod_autonomy_mode(priv); | |
34 | + } | |
35 | ||
36 | usbhs_platform_call(priv, phy_reset, pdev); | |
37 |