diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/usb/gadget.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r-- | include/linux/usb/gadget.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index d3ef42d7d2f0..dd1571db55e7 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -72,7 +72,7 @@ struct usb_ep; | |||
72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt | 72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt |
73 | * transfers. interrupt-only endpoints can be much less functional. | 73 | * transfers. interrupt-only endpoints can be much less functional. |
74 | * | 74 | * |
75 | * NOTE: this is analagous to 'struct urb' on the host side, except that | 75 | * NOTE: this is analogous to 'struct urb' on the host side, except that |
76 | * it's thinner and promotes more pre-allocation. | 76 | * it's thinner and promotes more pre-allocation. |
77 | */ | 77 | */ |
78 | 78 | ||
@@ -269,7 +269,7 @@ static inline void usb_ep_free_request(struct usb_ep *ep, | |||
269 | * | 269 | * |
270 | * Control endpoints ... after getting a setup() callback, the driver queues | 270 | * Control endpoints ... after getting a setup() callback, the driver queues |
271 | * one response (even if it would be zero length). That enables the | 271 | * one response (even if it would be zero length). That enables the |
272 | * status ack, after transfering data as specified in the response. Setup | 272 | * status ack, after transferring data as specified in the response. Setup |
273 | * functions may return negative error codes to generate protocol stalls. | 273 | * functions may return negative error codes to generate protocol stalls. |
274 | * (Note that some USB device controllers disallow protocol stall responses | 274 | * (Note that some USB device controllers disallow protocol stall responses |
275 | * in some cases.) When control responses are deferred (the response is | 275 | * in some cases.) When control responses are deferred (the response is |
@@ -705,11 +705,6 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget) | |||
705 | * struct usb_gadget_driver - driver for usb 'slave' devices | 705 | * struct usb_gadget_driver - driver for usb 'slave' devices |
706 | * @function: String describing the gadget's function | 706 | * @function: String describing the gadget's function |
707 | * @speed: Highest speed the driver handles. | 707 | * @speed: Highest speed the driver handles. |
708 | * @bind: Invoked when the driver is bound to a gadget, usually | ||
709 | * after registering the driver. | ||
710 | * At that point, ep0 is fully initialized, and ep_list holds | ||
711 | * the currently-available endpoints. | ||
712 | * Called in a context that permits sleeping. | ||
713 | * @setup: Invoked for ep0 control requests that aren't handled by | 708 | * @setup: Invoked for ep0 control requests that aren't handled by |
714 | * the hardware level driver. Most calls must be handled by | 709 | * the hardware level driver. Most calls must be handled by |
715 | * the gadget driver, including descriptor and configuration | 710 | * the gadget driver, including descriptor and configuration |
@@ -774,7 +769,6 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget) | |||
774 | struct usb_gadget_driver { | 769 | struct usb_gadget_driver { |
775 | char *function; | 770 | char *function; |
776 | enum usb_device_speed speed; | 771 | enum usb_device_speed speed; |
777 | int (*bind)(struct usb_gadget *); | ||
778 | void (*unbind)(struct usb_gadget *); | 772 | void (*unbind)(struct usb_gadget *); |
779 | int (*setup)(struct usb_gadget *, | 773 | int (*setup)(struct usb_gadget *, |
780 | const struct usb_ctrlrequest *); | 774 | const struct usb_ctrlrequest *); |
@@ -798,17 +792,19 @@ struct usb_gadget_driver { | |||
798 | */ | 792 | */ |
799 | 793 | ||
800 | /** | 794 | /** |
801 | * usb_gadget_register_driver - register a gadget driver | 795 | * usb_gadget_probe_driver - probe a gadget driver |
802 | * @driver:the driver being registered | 796 | * @driver: the driver being registered |
797 | * @bind: the driver's bind callback | ||
803 | * Context: can sleep | 798 | * Context: can sleep |
804 | * | 799 | * |
805 | * Call this in your gadget driver's module initialization function, | 800 | * Call this in your gadget driver's module initialization function, |
806 | * to tell the underlying usb controller driver about your driver. | 801 | * to tell the underlying usb controller driver about your driver. |
807 | * The driver's bind() function will be called to bind it to a | 802 | * The @bind() function will be called to bind it to a gadget before this |
808 | * gadget before this registration call returns. It's expected that | 803 | * registration call returns. It's expected that the @bind() function will |
809 | * the bind() functions will be in init sections. | 804 | * be in init sections. |
810 | */ | 805 | */ |
811 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); | 806 | int usb_gadget_probe_driver(struct usb_gadget_driver *driver, |
807 | int (*bind)(struct usb_gadget *)); | ||
812 | 808 | ||
813 | /** | 809 | /** |
814 | * usb_gadget_unregister_driver - unregister a gadget driver | 810 | * usb_gadget_unregister_driver - unregister a gadget driver |
@@ -894,8 +890,8 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v) | |||
894 | /* utility wrapping a simple endpoint selection policy */ | 890 | /* utility wrapping a simple endpoint selection policy */ |
895 | 891 | ||
896 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 892 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
897 | struct usb_endpoint_descriptor *) __devinit; | 893 | struct usb_endpoint_descriptor *); |
898 | 894 | ||
899 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; | 895 | extern void usb_ep_autoconfig_reset(struct usb_gadget *); |
900 | 896 | ||
901 | #endif /* __LINUX_USB_GADGET_H */ | 897 | #endif /* __LINUX_USB_GADGET_H */ |