usb: chipidea: imx: enable vbus and id wakeup only for OTG events

If ID or VBUS is from external block, don't enable its wakeup
because it isn't used at all.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
This commit is contained in:
Li Jun
2019-09-09 14:41:41 +08:00
committed by Peter Chen
parent 72dc8df792
commit 93c2c7330a
3 changed files with 33 additions and 8 deletions

View File

@@ -433,6 +433,14 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
goto err_clk;
}
if (!IS_ERR(pdata.id_extcon.edev) ||
of_property_read_bool(np, "usb-role-switch"))
data->usbmisc_data->ext_id = 1;
if (!IS_ERR(pdata.vbus_extcon.edev) ||
of_property_read_bool(np, "usb-role-switch"))
data->usbmisc_data->ext_vbus = 1;
ret = imx_usbmisc_init_post(data->usbmisc_data);
if (ret) {
dev_err(dev, "usbmisc post failed, ret=%d\n", ret);