diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb/gadget.h | 6 | ||||
-rw-r--r-- | include/linux/usb/otg.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 0460a746480c..bbf45d500b6d 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -598,6 +598,7 @@ static inline int usb_gadget_clear_selfpowered(struct usb_gadget *gadget) | |||
598 | /** | 598 | /** |
599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered | 599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered |
600 | * @gadget:The device which now has VBUS power. | 600 | * @gadget:The device which now has VBUS power. |
601 | * Context: can sleep | ||
601 | * | 602 | * |
602 | * This call is used by a driver for an external transceiver (or GPIO) | 603 | * This call is used by a driver for an external transceiver (or GPIO) |
603 | * that detects a VBUS power session starting. Common responses include | 604 | * that detects a VBUS power session starting. Common responses include |
@@ -636,6 +637,7 @@ static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) | |||
636 | /** | 637 | /** |
637 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end | 638 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end |
638 | * @gadget:the device whose VBUS supply is being described | 639 | * @gadget:the device whose VBUS supply is being described |
640 | * Context: can sleep | ||
639 | * | 641 | * |
640 | * This call is used by a driver for an external transceiver (or GPIO) | 642 | * This call is used by a driver for an external transceiver (or GPIO) |
641 | * that detects a VBUS power session ending. Common responses include | 643 | * that detects a VBUS power session ending. Common responses include |
@@ -792,19 +794,20 @@ struct usb_gadget_driver { | |||
792 | /** | 794 | /** |
793 | * usb_gadget_register_driver - register a gadget driver | 795 | * usb_gadget_register_driver - register a gadget driver |
794 | * @driver:the driver being registered | 796 | * @driver:the driver being registered |
797 | * Context: can sleep | ||
795 | * | 798 | * |
796 | * Call this in your gadget driver's module initialization function, | 799 | * Call this in your gadget driver's module initialization function, |
797 | * to tell the underlying usb controller driver about your driver. | 800 | * to tell the underlying usb controller driver about your driver. |
798 | * The driver's bind() function will be called to bind it to a | 801 | * The driver's bind() function will be called to bind it to a |
799 | * gadget before this registration call returns. It's expected that | 802 | * gadget before this registration call returns. It's expected that |
800 | * the bind() functions will be in init sections. | 803 | * the bind() functions will be in init sections. |
801 | * This function must be called in a context that can sleep. | ||
802 | */ | 804 | */ |
803 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); | 805 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); |
804 | 806 | ||
805 | /** | 807 | /** |
806 | * usb_gadget_unregister_driver - unregister a gadget driver | 808 | * usb_gadget_unregister_driver - unregister a gadget driver |
807 | * @driver:the driver being unregistered | 809 | * @driver:the driver being unregistered |
810 | * Context: can sleep | ||
808 | * | 811 | * |
809 | * Call this in your gadget driver's module cleanup function, | 812 | * Call this in your gadget driver's module cleanup function, |
810 | * to tell the underlying usb controller that your driver is | 813 | * to tell the underlying usb controller that your driver is |
@@ -813,7 +816,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver); | |||
813 | * to unbind() and clean up any device state, before this procedure | 816 | * to unbind() and clean up any device state, before this procedure |
814 | * finally returns. It's expected that the unbind() functions | 817 | * finally returns. It's expected that the unbind() functions |
815 | * will in in exit sections, so may not be linked in some kernels. | 818 | * will in in exit sections, so may not be linked in some kernels. |
816 | * This function must be called in a context that can sleep. | ||
817 | */ | 819 | */ |
818 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 820 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
819 | 821 | ||
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 94df4fe6c6c0..60a52576fd5c 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -86,6 +86,7 @@ extern int otg_set_transceiver(struct otg_transceiver *); | |||
86 | extern struct otg_transceiver *otg_get_transceiver(void); | 86 | extern struct otg_transceiver *otg_get_transceiver(void); |
87 | extern void otg_put_transceiver(struct otg_transceiver *); | 87 | extern void otg_put_transceiver(struct otg_transceiver *); |
88 | 88 | ||
89 | /* Context: can sleep */ | ||
89 | static inline int | 90 | static inline int |
90 | otg_start_hnp(struct otg_transceiver *otg) | 91 | otg_start_hnp(struct otg_transceiver *otg) |
91 | { | 92 | { |
@@ -102,6 +103,8 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
102 | 103 | ||
103 | 104 | ||
104 | /* for usb peripheral controller drivers */ | 105 | /* for usb peripheral controller drivers */ |
106 | |||
107 | /* Context: can sleep */ | ||
105 | static inline int | 108 | static inline int |
106 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) | 109 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) |
107 | { | 110 | { |
@@ -114,6 +117,7 @@ otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
114 | return otg->set_power(otg, mA); | 117 | return otg->set_power(otg, mA); |
115 | } | 118 | } |
116 | 119 | ||
120 | /* Context: can sleep */ | ||
117 | static inline int | 121 | static inline int |
118 | otg_set_suspend(struct otg_transceiver *otg, int suspend) | 122 | otg_set_suspend(struct otg_transceiver *otg, int suspend) |
119 | { | 123 | { |