summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2014-09-22 02:14:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-24 06:32:31 +0200
commit27c62c2da177178771517744acaced08767214e2 (patch)
tree72b57e9d294226fc672d352894ef95b5fd39b42a /drivers/usb/chipidea
parentchipidea: usbmisc_imx: Add USB support for VF610 SoCs (diff)
downloadlinux-27c62c2da177178771517744acaced08767214e2.tar.xz
linux-27c62c2da177178771517744acaced08767214e2.zip
usb: chipidea: otg initialization is only needed when the gadget is supported
We have only needed to enable otg initialization when both of below conditions are satisfied: - The controller is otg capable - The gadget function is enabled If the controller is otg capable, but is host-only configuration, we do not need to access register otgsc and do any otg operations (eg, create otg workqueue). Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 41d45a16dd30..7cb74c4f0e92 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -662,7 +662,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
goto deinit_phy;
}
- if (ci->is_otg) {
+ if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) {
/* Disable and clear all OTG irq */
hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS,
OTGSC_INT_STATUS_BITS);