]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.40/usb-renesas_usbhs-fix-usbhsc_resume-for-usbhsf_runtime_pwctrl.patch
3.18-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.40 / usb-renesas_usbhs-fix-usbhsc_resume-for-usbhsf_runtime_pwctrl.patch
CommitLineData
551c296c
GKH
1From 59a0879a0e17b2e43ecdc5e3299da85b8410d7ce Mon Sep 17 00:00:00 2001
2From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
3Date: Wed, 19 Jul 2017 16:16:54 +0900
4Subject: usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL
5
6From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
7
8commit 59a0879a0e17b2e43ecdc5e3299da85b8410d7ce upstream.
9
10This patch fixes an issue that some registers may be not initialized
11after resume if the USBHSF_RUNTIME_PWCTRL is not set. Otherwise,
12if a cable is not connected, the driver will not enable INTENB0.VBSE
13after resume. And then, the driver cannot detect the VBUS.
14
15Fixes: ca8a282a5373 ("usb: gadget: renesas_usbhs: add suspend/resume support")
16Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
17Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
18Signed-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