aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/otg.h
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2009-01-25 02:54:31 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 19:20:26 -0400
commitc2344f13b59e007d782a3e591ebc551bc583a8b7 (patch)
tree17eda364b35d5c064c47e45b50487912844a0fa3 /include/linux/usb/otg.h
parentdd44be6b17ac52238aa6c7f46b906d9fb76e7052 (diff)
USB: gpio_vbus: add delayed vbus_session calls
Call usb_gadget_vbus_connect() and ...disconnect() from a workqueue rather than from an irq handler, allowing msleep() calls in vbus_session. Update kerneldoc to match. [ dbrownell@users.sourceforge.net: more kerneldoc updates ] Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb/otg.h')
-rw-r--r--include/linux/usb/otg.h4
1 files changed, 4 insertions, 0 deletions
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 *);
86extern struct otg_transceiver *otg_get_transceiver(void); 86extern struct otg_transceiver *otg_get_transceiver(void);
87extern void otg_put_transceiver(struct otg_transceiver *); 87extern void otg_put_transceiver(struct otg_transceiver *);
88 88
89/* Context: can sleep */
89static inline int 90static inline int
90otg_start_hnp(struct otg_transceiver *otg) 91otg_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 */
105static inline int 108static inline int
106otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) 109otg_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 */
117static inline int 121static inline int
118otg_set_suspend(struct otg_transceiver *otg, int suspend) 122otg_set_suspend(struct otg_transceiver *otg, int suspend)
119{ 123{