diff options
author | Mian Yousaf Kaukab <yousaf.kaukab@intel.com> | 2015-09-22 15:16:55 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-10-01 12:40:19 -0500 |
commit | ec4cc6579c7334fb334ba2f30214f5c41b16c6e8 (patch) | |
tree | 5406d138fea5c0f99b49c59b48e578f9cd77650c /drivers/usb/dwc2 | |
parent | 065d393124f06ef1f5a20a6f5f262fee2cfa873d (diff) |
usb: dwc2: gadget: initialize op_state for peripheral only configuration
ID status change interrupt will not be handled in peripheral only
configuration. So initialize op_state during gadget init.
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index ddb54272478d..36345ab05f7e 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -3535,6 +3535,8 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq) hsotg->gadget.name = dev_name(dev); if (hsotg->dr_mode == USB_DR_MODE_OTG) hsotg->gadget.is_otg = 1; + else if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) + hsotg->op_state = OTG_STATE_B_PERIPHERAL; /* reset the system */ |