aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/ep0.c
diff options
context:
space:
mode:
authorPratyush Anand <pratyush.anand@st.com>2012-06-25 22:40:43 +0530
committerFelipe Balbi <balbi@ti.com>2012-07-02 10:02:07 +0300
commit08f0d96670c53898b4154e7945e77cdd966003f7 (patch)
tree52dca96f5bef8c30131cd9b653be603b2f59fc7d /drivers/usb/dwc3/ep0.c
parent5c81ababecd7ddae08ca944a65d8030cd393013c (diff)
usb: dwc3: correct set_halt implementation for ep0
set_halt for ep0 is called to stall a deferred control responses by the gadget. We already have a function to stall default control endpoint. This patch points set_halt for ep0 to the already available function. Signed-off-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Michel Sanches <michel.sanches@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r--drivers/usb/dwc3/ep0.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 8244eb53082e..1315e787a316 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -225,6 +225,16 @@ static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc)
dwc3_ep0_out_start(dwc);
}
+int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
+{
+ struct dwc3_ep *dep = to_dwc3_ep(ep);
+ struct dwc3 *dwc = dep->dwc;
+
+ dwc3_ep0_stall_and_restart(dwc);
+
+ return 0;
+}
+
void dwc3_ep0_out_start(struct dwc3 *dwc)
{
int ret;