summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2016-05-10 15:01:44 -0700
committerJeevan Shriram <jshriram@codeaurora.org>2016-05-11 17:43:59 -0700
commitf217c8f35372de37c941068bc9a5bfe4456798e7 (patch)
treeb23fffe40fc4f42528876e2adc236ae488bf5815
parent9fe2a82e32ddc2eb990576a76bc60efcb0e97fb0 (diff)
usb: dwc3: Add support for gsi endpoint disable operation
gsi driver does not call the gadget API usb_ep_enable() instead uses gsi ep operation call back to enable gsi ep. As a result ep->enabled flag remains clear. Later function driver calls usb_ep_disble() API from gadget framework and ep disable operation gets skipped. Fix this by adding gsi ep operation for ep disable. This makes the enable and disable ep operations both handled by gsi ep ops. CRs-Fixed: 1013830 Change-Id: I5caa9a839b9fdd144af0a59a7c605777f7a3a659 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
-rw-r--r--drivers/usb/dwc3/dwc3-msm.c4
-rw-r--r--include/linux/usb/gadget.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
index 5dbe537a41ea..2b0299c293e2 100644
--- a/drivers/usb/dwc3/dwc3-msm.c
+++ b/drivers/usb/dwc3/dwc3-msm.c
@@ -1291,6 +1291,10 @@ static int dwc3_msm_gsi_ep_op(struct usb_ep *ep,
f_suspend = *((bool *)op_data);
ret = gsi_check_ready_to_suspend(ep, f_suspend);
break;
+ case GSI_EP_OP_DISABLE:
+ dev_dbg(mdwc->dev, "EP_OP_DISABLE\n");
+ ret = ep->ops->disable(ep);
+ break;
default:
dev_err(mdwc->dev, "%s: Invalid opcode GSI EP\n", __func__);
}
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index ab06d2988505..2c64620254eb 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -48,6 +48,7 @@ enum gsi_ep_op {
GSI_EP_OP_FREE_TRBS,
GSI_EP_OP_SET_CLR_BLOCK_DBL,
GSI_EP_OP_CHECK_FOR_SUSPEND,
+ GSI_EP_OP_DISABLE,
};
/*