Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280880
b: refs/heads/master
c: ced6e09
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 12, 2011
1 parent a89ea45 commit bea60cd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cf1b06e906d8590fc027264af30b37754bd8226
refs/heads/master: ced6e09e6ec4f52c9bd76d6b8debd67517fdcc1c
26 changes: 26 additions & 0 deletions trunk/drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,29 @@ struct usbhsg_recip_handle req_clear_feature = {
.endpoint = usbhsg_recip_handler_std_clear_endpoint,
};

/*
* USB_TYPE_STANDARD / set feature functions
*/
static int usbhsg_recip_handler_std_set_endpoint(struct usbhs_priv *priv,
struct usbhsg_uep *uep,
struct usb_ctrlrequest *ctrl)
{
struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);

usbhs_pipe_stall(pipe);

usbhsg_recip_handler_std_control_done(priv, uep, ctrl);

return 0;
}

struct usbhsg_recip_handle req_set_feature = {
.name = "set feature",
.device = usbhsg_recip_handler_std_control_done,
.interface = usbhsg_recip_handler_std_control_done,
.endpoint = usbhsg_recip_handler_std_set_endpoint,
};

/*
* USB_TYPE handler
*/
Expand Down Expand Up @@ -405,6 +428,9 @@ static int usbhsg_irq_ctrl_stage(struct usbhs_priv *priv,
case USB_REQ_CLEAR_FEATURE:
recip_handler = &req_clear_feature;
break;
case USB_REQ_SET_FEATURE:
recip_handler = &req_set_feature;
break;
}
}

Expand Down

0 comments on commit bea60cd

Please sign in to comment.