summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2019-09-11 16:59:54 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-04-15 01:24:40 +0200
commite5e4d6d3189f5608ab4a9f0c5d4e65d5b3c7b243 (patch)
tree4b3397b61e66f2e5c066c148f5b39d1347004ae6
parent87d5a1ac1c6348cecb0bf3c6d20c9a701977cf2c (diff)
usb: chipidea: use seperate role sm when using extcon
Enable the code from commit 'aa5fc842bb05 usb: chipidea: use of extcon framework to work for non OTG case' if ID and/or VBUS signals are taken from extcon. Otherwise (observed on a Colibri iMX6ULL) when booting in the ROLE_HOST and then changing to ROLE_GADGET the gadget does not appear on the bus and switching back to ROLE_HOST does also no longer detect any connected USB devices. Related-to: #50573 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--drivers/usb/chipidea/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 8269046b684d..d04c65f2e886 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -737,6 +737,7 @@ static int ci_get_platdata(struct device *dev,
ext_id = extcon_get_edev_by_phandle(dev, 1);
if (IS_ERR(ext_id) && PTR_ERR(ext_id) != -ENODEV)
return PTR_ERR(ext_id);
+ platdata->flags |= CI_HDRC_DUAL_ROLE_NOT_OTG;
}
cable = &platdata->vbus_extcon;