summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci_hdrc_imx.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2020-07-28 14:12:11 +0800
committerPeter Chen <peter.chen@nxp.com>2020-07-28 14:12:11 +0800
commitd6f93d21001e4388a25b0b922e02e64bc6004d2f (patch)
tree2e15ef155f5cd2ffadbb958bcb0b2efd8bba9ef3 /drivers/usb/chipidea/ci_hdrc_imx.c
parent62b9825827518843f0f93dec6730ddcde14eb5b2 (diff)
downloadlinux-d6f93d21001e4388a25b0b922e02e64bc6004d2f.tar.bz2
usb: chipidea: imx: get available runtime dr mode for wakeup setting
If runtime dr_mode is not dual-role, it doesn't need to enable ID wakeup interrupt. If runtime dr_mode is host, it doesn't need to enable VBUS wakeup interrupt. With these changes, the user will not get the unexpected wakeup for single role use case. For example, the host-only use case at Micro-AB port, the controller should not be waken up by only plug in Micro-AB cable or the Micro-B cable with host. Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/ci_hdrc_imx.c')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 5ae16368a0c7..c39e2b615ac6 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -462,6 +462,10 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
if (!IS_ERR(pdata.vbus_extcon.edev) ||
of_property_read_bool(np, "usb-role-switch"))
data->usbmisc_data->ext_vbus = 1;
+
+ /* usbmisc needs to know dr mode to choose wakeup setting */
+ data->usbmisc_data->available_role =
+ ci_hdrc_query_available_role(data->ci_pdev);
}
ret = imx_usbmisc_init_post(data->usbmisc_data);